class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: F = None
        self.t: G = None
        self.v: F = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: E = None
        self.q: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: F = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: D = None
        self.o: D = None
        self.p: A = None
        self.s: H = None
        self.v: D = None
        self.r: A = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: A = None
        self.y: C = None
        self.v: D = None
        self.t: C = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: E = None
        self.txt = txt

i = A("i")
n = B("n")
h = C("h")
k = D("k")
a = E("a")
m = F("m")
l = G("l")
g = H("g")

i.x = g
i.p = m
i.v = m
i.t = l
i.y = h
n.z = i
n.x = a
n.q = m
h.q = i
h.v = m
h.x = k
h.z = k
h.u = k
h.r = k
k.t = h
k.z = m
k.x = m
a.o = m
m.q = h
m.y = k
m.o = k
m.v = k
m.p = i
m.r = i
m.s = g
m.w = n
l.o = h
l.y = h
l.t = h
l.z = h
l.u = i
l.v = k
g.x = m
g.t = a
assert m.q.v.r.t.v.t.txt == "
class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: F = None
        self.t: G = None
        self.v: F = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: E = None
        self.q: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: F = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: D = None
        self.o: D = None
        self.p: A = None
        self.s: H = None
        self.v: D = None
        self.r: A = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: A = None
        self.y: C = None
        self.v: D = None
        self.t: C = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: E = None
        self.txt = txt

i = A("i")
n = B("n")
h = C("h")
k = D("k")
a = E("a")
m = F("m")
l = G("l")
g = H("g")

i.x = g
i.p = m
i.v = m
i.t = l
i.y = h
n.z = i
n.x = a
n.q = m
h.q = i
h.v = m
h.x = k
h.z = k
h.u = k
h.r = k
k.t = h
k.z = m
k.x = m
a.o = m
m.q = h
m.y = k
m.o = k
m.v = k
m.p = i
m.r = i
m.s = g
m.w = n
l.o = h
l.y = h
l.t = h
l.z = h
l.u = i
l.v = k
g.x = m
g.t = a
assert m.q.v.r.t.v.t.txt == "h"