```python
def first_Element(arr, n, k):
    """
    Finds the first element in an array that occurs exactly k times.

    Args:
        arr: The input list of elements.
        n: The size of the list (unused in this Python implementation).
        k: The target occurrence count.

    Returns:
        The first element that occurs k times, or -1 if no such element exists.
    """
    # Create a dictionary to store the frequency of each element.
    element_counts = {}
    for element in arr:
        element_counts[element] = element_counts.get(element, 0) + 1

    # Iterate through the original array to find the first element
    # that has a count of k. This preserves the original order.
    for element in arr:
        if element_counts[element] == k:
            return element

    # If the loop completes, no element occurred exactly k times.
    return -1
```