The first line of input contains N. Each of the next N lines describes a cow, and contains two integers and a character. The integers indicate a point (x,y) (0 <= x, y <= 1000) at which the cow is located. The character is H or G, indicating the cow's breed. No two cows are located at the same point, and there is always at least one Holstein.