def mapper():
    log_pattern = re.compile(r'^(\S+) - - \[(\d{2})/(\w{3})/(\d{4}):(\d{2}):\d{2}:\d{2} .*\]')
    
    for line in sys.stdin:
        match = log_pattern.match(line)
        if match:
            ip = match.group(1)
            hour = match.group(5)  # Extract hour from timestamp
            print(f"{hour}\t{ip}")