import tables let S = stdin.readLine var dic = initCountTable[char]() flg: bool for s in S: dic.inc s for a in ('a' .. 'm'): var dic2 = dic dic2.inc a if dic2.len >= 13 and dic2.largest.val >= 2: echo a flg = true if not flg: echo "Impossible"