Read input and recognize operations (incomplete)