#include [[nodiscard]] static inline constexpr std::string solve(std::string&& S) noexcept { for (auto& s : S) { if (std::islower(s)) s = toupper(s); else s = tolower(s); } return S; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); std::string S; S.reserve(100); std::cin >> S; std::cout << solve(std::move(S)) << '\n'; return 0; }