Let \( t \) be the time Hannah spends running on the sidewalk in seconds. Therefore, the time she spends running in the street will be \( 12 - t \) seconds, since the total running time is 12 seconds.
The distance Hannah covers while running on the sidewalk can be calculated using the formula:
\[ \text{Distance} = \text{Speed} \times \text{Time} \]
For the sidewalk:
\[ \text{Distance on sidewalk} = 16 , \text{feet/second} \times t , \text{seconds} = 16t , \text{feet} \]
For the street:
\[ \text{Distance in street} = 3 , \text{feet/second} \times (12 - t) , \text{seconds} = 3(12 - t) , \text{feet} = 36 - 3t , \text{feet} \]
The total distance that Hannah runs is the sum of the distances she runs on the sidewalk and in the street:
\[ \text{Total distance} = \text{Distance on sidewalk} + \text{Distance in street} \]
Given that the total distance is 127 feet, we set up the equation:
\[ 16t + (36 - 3t) = 127 \]
Now, simplify and solve for \( t \):
\[ 16t + 36 - 3t = 127 \] \[ 13t + 36 = 127 \] \[ 13t = 127 - 36 \] \[ 13t = 91 \] \[ t = \frac{91}{13} \] \[ t = 7 \]
Hannah spent \( \boxed{7} \) seconds running on the sidewalk.