class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: D = None
        self.y: F = None
        self.u: A = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: A = None
        self.x: E = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: A = None
        self.x: G = None
        self.s: G = None
        self.w: D = None
        self.u: C = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: E = None
        self.v: G = None
        self.q: D = None
        self.x: E = None
        self.p: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

g = A("g")
f = B("f")
h = C("h")
n = D("n")
e = E("e")
l = F("l")
i = G("i")
k = E("k")
j = A("j")
a = D("a")

g.t = l
g.q = l
f.r = l
f.y = l
f.x = a
f.u = g
f.q = n
h.t = l
h.y = j
h.u = j
h.x = e
n.v = l
n.y = l
n.r = j
n.x = i
n.s = i
n.w = a
n.u = h
e.u = f
e.r = k
e.x = k
e.p = k
e.v = i
e.q = a
l.u = g
i.x = e
k.u = f
k.r = e
k.x = e
k.p = e
k.v = i
k.q = n
j.t = l
j.q = l
a.v = l
a.y = l
a.r = j
a.x = i
a.s = i
a.w = n
a.u = h
assert n.y.u.q.u.q.u.q.txt == "
class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: D = None
        self.y: F = None
        self.u: A = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: A = None
        self.x: E = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: A = None
        self.x: G = None
        self.s: G = None
        self.w: D = None
        self.u: C = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: E = None
        self.v: G = None
        self.q: D = None
        self.x: E = None
        self.p: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

g = A("g")
f = B("f")
h = C("h")
n = D("n")
e = E("e")
l = F("l")
i = G("i")
k = E("k")
j = A("j")
a = D("a")

g.t = l
g.q = l
f.r = l
f.y = l
f.x = a
f.u = g
f.q = n
h.t = l
h.y = j
h.u = j
h.x = e
n.v = l
n.y = l
n.r = j
n.x = i
n.s = i
n.w = a
n.u = h
e.u = f
e.r = k
e.x = k
e.p = k
e.v = i
e.q = a
l.u = g
i.x = e
k.u = f
k.r = e
k.x = e
k.p = e
k.v = i
k.q = n
j.t = l
j.q = l
a.v = l
a.y = l
a.r = j
a.x = i
a.s = i
a.w = n
a.u = h
assert n.y.u.q.u.q.u.q.txt == "l"