Wrote input parser