A Koch curve is drawn in the XY plane. The curve is defined recursively.

Start with the segment of length 1 from (0,0) to (1,0). That segment is the level 0 Koch curve.

Split the segment into three equal parts, build an equilateral triangle whose base is the middle part, then erase that base. The curve you get is the level 1 Koch curve.

Apply the same replacement to each of the four segments of the level 1 curve and you get the level 2 curve.

Repeating gives higher levels. The picture above is the level 4 curve.
The curve starts at (0,0) and ends at (1,0). Every equilateral triangle is drawn on the left of the direction of travel, walking each segment from its start point to its end point.
Consider the strip of the XY plane between X=0 and X=1. A Koch curve splits this strip into an upper part and a lower part. Given a point (x,y) with 0<x<1, decide which part holds the point for a Koch curve of a given level.
The first line has the number of points N to classify, with N>0. Each of the next N lines has three values L, X, Y. L is an integer with 0≤L≤10 and gives the level of the curve. X and Y are floating point numbers with 0<X<1 and −10<Y<10.
For each point print one line: Above if the point is in the upper part, Below if it is in the lower part. No point of the input is exactly on the curve. Every point is at least about 0.0000001 away from the nearest segment of the curve.