Added command 'Q'

Added command 'Q': Query - printing output values in needed format for omh.