Valya Tolya ideal pair quarrel recently Valya take offense boyfriend come tshirt letter differ letter pullover now do not want tolya seating room cry photo day longthis story sad fairy godmother Tolyas grandmother decide help restore relationship she secretly take Tolyas tshirt Valyas pullover want lettering in order unit mana buy spell change letter clothe your task calculate minimum mana Tolyas grandmother spend rescue love Tolya ValyaMore formally lettering Tolyas tshirt Valyas pullover string length n consist lowercase english letter use unit mana grandmother buy spell form c1c2 c1 c2 lowercase English letter arbitrary number time transform single letter c1 c2 viseversa Tolyas tshirt Valyas pullover you find minimum mana grandmother spend buy set spell lettering equal in addition output require set spell