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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: E = None
        self.s: G = None
        self.y: E = None
        self.o: B = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: B = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: H = None
        self.u: A = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: E = None
        self.s: G = None
        self.y: E = None
        self.o: B = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: B = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: H = None
        self.u: A = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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