def kasiski_examination(ciphertext):
    repeated_seq_spacings = find_repeat_sequences_spacings(ciphertext)
    seq_factors = {}
    for seq in repeated_seq_spacings:
        seq_factors[seq] = []
        for spacing in repeated_seq_spacings[seq]:
            seq_factors[seq].extend(get_useful_factors(spacing))
    factors_by_count = get_most_common_factors(seq_factors)
    all_likely_key_lengths = []
    for twoIntTuple in factors_by_count:
        all_likely_key_lengths.append(twoIntTuple[0])
    return all_likely_key_lengths
def kasiski_examination(ciphertext):
    repeated_seq_spacings = find_repeat_sequences_spacings(ciphertext)
    seq_factors = {}
    for seq in repeated_seq_spacings:
        seq_factors[seq] = []
        for spacing in repeated_seq_spacings[seq]:
            seq_factors[seq].extend(get_useful_factors(spacing))
    factors_by_count = get_most_common_factors(seq_factors)
    all_likely_key_lengths = []
    for twoIntTuple in factors_by_count:
        all_likely_key_lengths.append(twoIntTuple[0])
    return all_likely_key_lengths