java program for separating latex heavy questions