2013 osmos recursive solution