#!/usr/bin/env python3

import sys
from itertools import cycle

def preprocess(data):
    return list(map(int, data))

def part1(data):
    return sum(data)


def part2(data):
    freqs = {0: 1}
    acc = 0

    for num in cycle(data):
        acc += num

        if freqs.get(acc, None):
            return acc

        freqs[acc] = 1

a4308ee3d611544e9788f5764bd35c18199ff859
<mask token>

<mask token>


def preprocess(data):
    return list(map(int, data))


def part1(data):
    return sum(data)


<mask token>

<mask token>


def preprocess(data):
    return list(map(int, data))


def part1(data):
    return sum(data)


def part2(data):
    freqs = {(0): 1}
    acc = 0
    for num in cycle(data):
        acc += num
        if freqs.get(acc, None):
            return acc
        freqs[acc] = 1

import sys
from itertools import cycle


def preprocess(data):
    return list(map(int, data))


def part1(data):
    return sum(data)


def part2(data):
    freqs = {(0): 1}
    acc = 0
    for num in cycle(data):
        acc += num
        if freqs.get(acc, None):
            return acc
        freqs[acc] = 1

#!/usr/bin/env python3

import sys
from itertools import cycle

def preprocess(data):
    return list(map(int, data))

def part1(data):
    return sum(data)


def part2(data):
    freqs = {0: 1}
    acc = 0

    for num in cycle(data):
        acc += num

        if freqs.get(acc, None):
            return acc

        freqs[acc] = 1
