usaco spin, pat 1027, 1031