Sue baked cookies for a school fundraiser. She sold three-fourths of the cookies during the first two hours of the fundraiser. She sold one-third of the remaining cookies during the next hour. If Sue had 12 cookies left, how many cookies did she bake?