Run each phase like below- For Phase 1 to Phase 4 make ./a.out < ip.txt For Phase 5 make ./python.sh ip1.py Done!