def main():
    pattern = input().upper()
    genome = input().upper()
    mismatches = int(input())
    occurrences = approximate_occurrences(genome, pattern, mismatches)
    for o in occurrences:
        print(o, end=' ')
    print()
def main():
    pattern = input().upper()
    genome = input().upper()
    mismatches = int(input())
    occurrences = approximate_occurrences(genome, pattern, mismatches)
    for o in occurrences:
        print(o, end=' ')
    print()