#!/usr/bin/env python3
# Convert input to hexadecimal.
import argparse
import sys

parser = argparse.ArgumentParser()
parser.add_argument("-a", metavar="STRING", help="input text")
args = parser.parse_args()

if args.a is not None:
    sys.stdout.write(args.a.encode().hex())

else:
    while hasattr(sys.stdin, "encoding"):
        sys.stdin = sys.stdin.detach()

    while buf := sys.stdin.read(4096):
        sys.stdout.write(buf.hex())

65582c78e1877505b1df5a5c499604fd2c14b878
<mask token>

<mask token>
parser.add_argument('-a', metavar='STRING', help='input text')
<mask token>
if args.a is not None:
    sys.stdout.write(args.a.encode().hex())
else:
    while hasattr(sys.stdin, 'encoding'):
        sys.stdin = sys.stdin.detach()
    while (buf := sys.stdin.read(4096)):
        sys.stdout.write(buf.hex())

<mask token>
parser = argparse.ArgumentParser()
parser.add_argument('-a', metavar='STRING', help='input text')
args = parser.parse_args()
if args.a is not None:
    sys.stdout.write(args.a.encode().hex())
else:
    while hasattr(sys.stdin, 'encoding'):
        sys.stdin = sys.stdin.detach()
    while (buf := sys.stdin.read(4096)):
        sys.stdout.write(buf.hex())

import argparse
import sys
parser = argparse.ArgumentParser()
parser.add_argument('-a', metavar='STRING', help='input text')
args = parser.parse_args()
if args.a is not None:
    sys.stdout.write(args.a.encode().hex())
else:
    while hasattr(sys.stdin, 'encoding'):
        sys.stdin = sys.stdin.detach()
    while (buf := sys.stdin.read(4096)):
        sys.stdout.write(buf.hex())

#!/usr/bin/env python3
# Convert input to hexadecimal.
import argparse
import sys

parser = argparse.ArgumentParser()
parser.add_argument("-a", metavar="STRING", help="input text")
args = parser.parse_args()

if args.a is not None:
    sys.stdout.write(args.a.encode().hex())

else:
    while hasattr(sys.stdin, "encoding"):
        sys.stdin = sys.stdin.detach()

    while buf := sys.stdin.read(4096):
        sys.stdout.write(buf.hex())
