#include<bits/stdc++.h>
using namespace std;
int a[+];
bool b[+];
int search(int k);
int print();
int n,num;
int main(){
cin>>n;
search();
cout<<num<<endl;
return ;
}
int search(int k){
for(int i=;i<=n;i++)
if(!b[i]){
a[k]=i;
b[i]=;
if(k==n) print();
else search(k+);
b[i]=;
} }
int print(){
num++;
for(int i=;i<=n;i++)
cout<<setw()<<a[i];
cout<<endl;
}
啦啦啦,又来了一遍全排列