Unable to access raw_input() data - Learning Python on Interviewstreet
===

I'm attempting to move over to Python after having worked in Matlab for the past few months. This is probably a simple question, but I haven't been able to find it in searching StackOverflow or Google yet.

The InterviewStreet problem I'm working on is pretty simple. It's an insertion sort question, checking how many times different numbers need to be switched in lists. They give us a raw_input() in the following format:

2

5

1 1 1 2 2

5

2 1 3 1 2

The first line is how many lists I need to sort, all subsequent even lines are the quantity of numbers in a list I need to sort, and the following odd lines are the actual lists that need sorting.

I am stuck waaay at the beginning. The best I've done is

> STDOUT = raw_input() 

> print STDOUT

which for some reason only gives the first integer in all test cases (for this one, it's 2).

This is probably obvious to you already, but how do I access the rest of the numbers with raw_input()?

Thanks!

P.S. Please don't help me with the rest of the problem, I actually want to try and solve it myself :)