#include int main(void) { char n[10], u; scanf("%s", n); int i = 0, t = 0, s; while (n[i] > 0) { if (n[i] >= t) { t = n[i]; s = i; } i++; } u = n[s]; n[s] = n[0]; n[0] = u; printf("%s\n", n); }