Read from input and create Solution class