First version of implementation and sample input