#!/bin/bash

output=$(python3 solve.py)

# Search for the flag in the output and print only the first occurrence
flag=$(echo "$output" | grep -oE 'HTB\{[^}]+\}' | head -n 1)

# Print the flag if found
if [[ -n "$flag" ]]; then
    echo "$flag"
else
    echo "Flag not found in the decoded message."
fi
