Jane Street Interview Question

Write a program that takes inputs and performs actions based on whether specific consecutive sequences of inputs were entered.