def PatternMatching(Pattern, Genome):
    """Find all occurrences of a pattern in a string."""
    occurrences = []
    for i in range(len(Genome)):
        if Pattern == Genome[i: (i + len(Pattern))]:
            occurrences.append(str(i))
    return ' '.join(occurrences)