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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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