class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: G = None
        self.p: E = None
        self.y: F = None
        self.w: B = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: H = None
        self.x: A = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: D = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: C = None
        self.q: D = None
        self.z: H = None
        self.o: D = None
        self.v: B = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: D = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: G = None
        self.y: A = None
        self.z: E = None
        self.r: D = None
        self.t: A = None
        self.txt = txt

k = A("k")
e = B("e")
j = C("j")
n = D("n")
m = E("m")
a = F("a")
b = G("b")
g = H("g")
i = G("i")
d = H("d")

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: H = None
        self.x: A = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: D = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: C = None
        self.q: D = None
        self.z: H = None
        self.o: D = None
        self.v: B = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: D = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: G = None
        self.y: A = None
        self.z: E = None
        self.r: D = None
        self.t: A = None
        self.txt = txt

k = A("k")
e = B("e")
j = C("j")
n = D("n")
m = E("m")
a = F("a")
b = G("b")
g = H("g")
i = G("i")
d = H("d")

k.t = d
k.u = i
k.p = m
k.s = m
k.y = a
k.w = e
e.w = k
j.y = k
j.q = a
n.r = a
n.u = d
n.x = k
n.o = b
m.o = e
m.u = e
m.v = n
a.s = m
a.y = j
a.q = n
a.o = n
a.t = n
a.z = g
a.v = e
b.t = a
b.u = a
b.r = n
g.v = i
g.x = i
g.y = k
g.t = k
g.z = m
g.r = n
i.t = a
i.u = a
i.r = n
d.v = b
d.x = b
d.y = k
d.t = k
d.z = m
d.r = n
assert d.x.u.q.txt == "n"