Goal
Your goal is to find all the ways you can write a word using only elements of the periodic table.
These elements have a one or two letter symbol (H, Be, Cr, W, ...).
For example, the word 'Pauses' can be written :
- PAuSEs (P Au S Es)
- PAuSeS (P Au Se S)
- PaUSEs (Pa U S Es)
- PaUSeS (Pa U Se S)
Note that every element is represented as a single uppercase letter, or an uppercase and a lowercase letter.
This is the list of all periodic elements : H He Li Be B C N O F Ne Na Mg Al Si P S Cl Ar K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe Cs Ba La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn Fr Ra Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr Rf Db Sg Bh Hs Mt Ds Rg Cn Nh Fl Mc Lv Ts Og
Input
One line : The word to spell (ignore case).
Output
On separate lines : Every possible spelling of the word using atomic symbols, or none if it is not possible.
The spellings must be ordered lexicographically (uppercase before lowercase).