C# (911) --------- not the greatest but I thought I'd try it with the handicap of c#. <!-- language: lang-csharp --> using System;class P{static void Main(){var s="HyHHeHeLiLiBeBeBoBCaCNitNOxOFlFNeNeSoNaMaMgAlAlSilSiPhPSuSChClArArPotKCalCaScScTitTiVaVChrCrManMnIrFeCoCoNiNiCopCuZiZnGaGaGeGeArsAsSeSeBrBrKrKrRuRbStSrYtYZirZrNioNbMoMoTecTcRutRuRhRhPaPdSiAgCadCdInInTiSnAnSbTelTeIoIXeXeCaeCsBaBaLaLaCeCePraPrNeoNdPrPmSaSmEuEuGadGdTeTbDyDyHoHoErErThTmYttYbLuLuHaHfTaTaTuWRheReOsOsIriIrPlPtGoAuMeHgThaTlLePbBiBiPoPoAsAtRaRnFrFrRadRaAcAcThoThProPaUrUNepNpPluPuAmAmCuCmBerBkCaliCfEiEsFeFmMenMdNoNoLawLrRuthRfDuDbSeaSgBohBhHasHsMeiMtDaDsRoRgCopeCnUnUutFleFlUnuUupLivLvUnunUusUnunoUuo";var d=new System.Collections.Specialized.StringDictionary();for(;;){var a=g(ref s);if(a=="")break;d[a]=g(ref s);}var t=Console.ReadLine();while((t=t.Remove(t.Length-2))!=""){;if(d.ContainsKey(t)){Console.WriteLine(d[t]);break;}}}static string g(ref string s){var n="";for(;;){if(s.Length<1||(n!=""&&s[0]<97))break;n+=s[0];s=s.Substring(1);}return n;}} So I wrote a program to turn the full name of elements (e.g. carbon) in to the smallest but still unique string possible and did this for all elements with respect to all the other unique strings. I then serialized that in to a big ugly string where capital letters denote the start of "chunks", with chunks alternating between being keys and values. Like KeyValueKey2Value2 etc. This script desterilizes that big string and cuts a character off the end of the inputted string until it finds it in the dictionary made from the big string. (I should add my knowledge of C# isn't amazing and the original submission I made was just using things I knew but I've subsequently had some tricks pointed out to me by others.)