import std.stdio, std.algorithm, std.conv, std.array, std.string; void main() { auto line = readln().strip(); string ans = line; for (int i = 0; i < line.length - 1; ++i) { for (int j = i + 1; j < line.length; ++j) { char[] s = line.to!(char[]); auto tmp = s[i]; s[i] = s[j]; s[j] = tmp; if (ans < s.to!string) ans = s.to!string; } } writeln(ans); }