Airline Scheduling Algorithm

I have a list of 6 direct flights. From this I want to get flights from A to B to C with connections. What will be a suitable algorithm for this problem? Thanks.