add library <set>
Let grammar be global variable
delete debug message
call getFirst in main and print it