Function to return the winner of the game
static String winner ( String moves ) { HashMap < Character , Integer > data = new HashMap < Character , Integer > ( ) ; data . put ( ' R ' , 0 ) ; data . put ( ' P ' , 1 ) ; data . put ( ' S ' , 2 ) ;