import argparse
import random

def main():
    # Set up argument parser
    parser = argparse.ArgumentParser(description="Generate a test case with a binary string.")
    parser.add_argument('-n', type=int, required=True, help="Length of the string")
    parser.add_argument('-s', type=int, required=True, help="Random seed")
    parser.add_argument('-g', type=int, required=True, help="Value G")
    
    # Parse the arguments
    args = parser.parse_args()
    
    n = args.n
    seed = args.s
    g = args.g
    
    # Initialize the random number generator with the provided seed
    random.seed(seed)
    
    # Generate a binary string of length n
    binary_string = ''.join(random.choices(['0', '1'], k=n))
    
    # Print N and G on the first line, separated by a space
    print(f"{n} {g}")
    
    # Print the binary string on the second line
    print(binary_string)

if __name__ == '__main__':
    main()
