Teenager invents robot to solve Rubik's Cube