#pragma GCC optimize ("Ofast")
#include<bits/stdc++.h>
using namespace std;
inline void rd(int &x){
  int k;
  int m=0;
  x=0;
  for(;;){
    k = getchar_unlocked();
    if(k=='-'){
      m=1;
      break;
    }
    if('0'<=k&&k<='9'){
      x=k-'0';
      break;
    }
  }
  for(;;){
    k = getchar_unlocked();
    if(k<'0'||k>'9'){
      break;
    }
    x=x*10+k-'0';
  }
  if(m){
    x=-x;
  }
}
inline void wt_L(char a){
  putchar_unlocked(a);
}
inline void wt_L(const char c[]){
  int i=0;
  for(i=0;c[i]!='\0';i++){
    putchar_unlocked(c[i]);
  }
}
int N;
int k;
char S[120];
int main(){
  int i;
  rd(N);
  for(i=(0);i<(N);i++){
    int Q5VJL1cS;
    for(Q5VJL1cS=(0);Q5VJL1cS<(N);Q5VJL1cS++){
      S[k++] = '9' - i;
    }
  }
  wt_L(S);
  wt_L('\n');
  return 0;
}
// cLay varsion 20200112-1

// --- original code ---
// int N, k;
// char S[120];
// {
//   rd(N);
//   rep(i,N) rep(N) S[k++] = '9' - i;
//   wt(S);
// }