#C14802. Letter Case Permutation

    ID: 44492 Type: Default 1000ms 256MiB

Letter Case Permutation

Letter Case Permutation

Given a string s containing alphanumeric characters, generate all possible strings by toggling the case of every letter in s. Non-letter characters remain unchanged. The number of possible permutations is \(2^k\), where \(k\) is the number of letters in s.

The output should list all unique permutations in lexicographical order, each on a separate line.

inputFormat

A single line containing the string s.

outputFormat

Print each possible permutation on a new line in lexicographical order.## sample

a1b2
A1B2

A1b2 a1B2 a1b2

</p>