solve tri1