import strutils const lower = {'a'..'z'} var s = stdin.readLine for i, e in s: if e in lower: s[i] = e.toUpper else: s[i] = e.toLower echo s