It depends on how the scripts are written. You mentioned each script needing two Y. I presume that each Y will need to be followed by an enter key (newline). In this case, it could be as simple as using the following for main_script.sh:
#!/bin/bash
echo $'Y\nY\n' | bash a1.sh
echo $'Y\nY\n' | bash a2.sh
echo $'Y\nY\n' | bash a3.sh
Above, the echo command sends two Y and newline characters to each of the scripts. You can adjust this as needed.
Some scripts will insist that interactive input come from the terminal, not stdin. Such scripts are harder, but not impossible, to fool. For them, use expect/pexpect.
More details
Let's look in more detail at one of those commands:
echo $'Y\nY\n' | bash a1.sh
The | is the pipe symbol. It connects the standard out of the echo command to the standard input of the a1.sh command. If a1.sh is amenable, this may allow us to pre-answer any and all questions that a1.sh asks.
In this case, the output from the echo command is $'Y\nY\n'. This is a bash shell syntax meaning Y, followed by newline character, denoted by \n, followed by Y, followed by newline, \n. A newline character is the same thing that the enter or return key generates.
Using expect
If your script does not accept input on stdin, then expect can be used to automate the interaction with script. As an example:
#!/bin/sh
expect <<EOF1
spawn a1.sh
expect "?"
send "Y\r"
expect "?"
send "Y\r"
sleep 1
EOF1
expect <<EOF2
spawn a2.sh
expect "?"
send "Y\r"
expect "?"
send "Y\r"
sleep 1
EOF2