#include int main() { int n; scanf("%d", &n); for (int i=1; i<=n*n; i++) { printf("%d", i%n); } return 0; }