#!/usr/bin/env python import sys def checks2(combination): result = [combination] if combination.startswith("C") and len(combination) == 6: c = combination while len(c) > 2 and c[-1] == "i": c = c[:-1] result.append(c) return(result) def checks(combination): result = checks2(combination) extra = [] for entry in result: if entry[1] == "P": extra.append(entry[:1] + "p" + entry[2:]) return(result + extra) print(""" #include "Values/Values" namespace Trampolines { """) for combination in sys.stdin.readlines(): combination = combination.rstrip("\n") for c in checks(combination): print("Values::NodeT S_%s = Values::symbolFromStr(\"%s\");" % (c, c)) print("};")