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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: E = None
        self.v: H = None
        self.t: G = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: G = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: B = None
        self.t: B = None
        self.w: D = None
        self.y: C = None
        self.o: C = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: H = None
        self.q: H = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: D = None
        self.q: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: E = None
        self.v: H = None
        self.t: G = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: G = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: B = None
        self.t: B = None
        self.w: D = None
        self.y: C = None
        self.o: C = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: H = None
        self.q: H = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: D = None
        self.q: A = None
        self.txt = txt

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

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

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