both samples running, tests added
input.txt for tests