def get_max_occuring_char(str1):
    if not str1:
        return None
    counts = {}
    max_char = str1[0]
    max_count = 0
    for ch in str1:
        counts[ch] = counts.get(ch, 0) + 1
        if counts[ch] > max_count:
            max_count = counts[ch]
            max_char = ch
    return max_char