Acid and Base

No attempts yetTime limit1sMemory limit256 MB

Problem

The pH of a solution measures how water ionizes to form H+H^+ (acids) or OHOH^- (bases).

There are four variables (pHpH, pOHpOH, H+H^+, and OHOH^-) and two equations:

pH=log10(H+)pH = -\log_{10}(H^+)

pOH=log10(OH)pOH = -\log_{10}(OH^-)

They are also related by pH+pOH=14pH + pOH = 14.

Input

The first line contains the number of data sets. Each data set is either an H+H^+ concentration written as H = ... or an OHOH^- concentration written as OH = ....

Output

For each data set, print the pH rounded to the nearest hundredth.