Switched to solve JULKA in Java