function cycleSequence(grid) {
const loads = [];
for (let i = 0; i < 200; i++) {
grid = spinCycle(grid);
loads.push(load(rotate(grid)));
}
const [len, offset] = AOC.arrayCycle(loads);
const n = offset + ((1000000000 - offset) % len);
grid = parse(puzzleInput);
for (let i = 0; i < n; i++) {
grid = spinCycle(grid);
}
return grid;
}