two pipes p and q can fill a cistern in 12 and 10 minutes respectively . both are opened together , but at the end of 3 minutes the first is turned off . how much longer will the cistern take to fill ?