Create solve.java

see Readme