<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_flipped_ext(file_id,ccd):
 """Given a list of exposure numbers and CCD, get them from the DB"""

    
    import MOPfits
    import os, shutil
    
    filename=MOPfits.adGet(file_id,extno=int(ccd))
    if int(ccd)<18:
        tfname=filename+"F"
	shutil.move(filename, tfname)
        os.system("imcopy %s[-*,-*] %s" % (tfname, filename))
	os.unlink(tfname)
    if not os.access(filename,os.R_OK):
        return(None)
    return(filename)