Improved logic of Alien Language problem - Not final