Flat connections and polyubles