module main; import std; import std.ascii : isUpper, toLower, toUpper; void main() { // 入力 auto S = readln.chomp.dup; // 答えの計算 foreach (ref c; S) { if (isUpper(c)) c = toLower(c); else c = toUpper(c); } // 答えの出力 writeln(S); }