STM Input: One alg per line