#include using namespace std; char st1[100]; char st2[100]; int main() { scanf("%s", st1); memcpy(st2, st1, sizeof st1); int n = strlen(st1); // acBddc124DbcdDa // acdbsdfwesdf234jlkjDSDFSDFjxxvxc for (int i = 1; i <= n; i++) { if (n % i == 0) { char c = st1[i - 1]; if (c >= 'a') st1[i - 1] = c - 'a' + 'A'; } } printf(st1); puts(""); n = strlen(st2); for (int i = 1; i <= n * n; i++) { if (n % i == 0) { char c = st2[i - 1]; if (c >= 'a') st2[i - 1] = c - 'a' + 'A'; } } printf(st2); return 0; }