#include using namespace std; const int MAXSIZE = 10; int m[MAXSIZE][MAXSIZE]; char alphabet[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ' '}; int* convert(string s) { int *ans = new int[s.length()]; for(int i=0; i> n; for(int i=0; i> m[i][j]; } } string s; getline(cin, s); getline(cin, s); while (s.length()%n != 0) s += ' '; int *vals = convert(s); string news = ""; for(int i=0; i