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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: E = None
        self.o: B = None
        self.q: G = None
        self.z: G = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: B = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: E = None
        self.s: A = None
        self.w: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: E = None
        self.o: B = None
        self.q: G = None
        self.z: G = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: B = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: E = None
        self.s: A = None
        self.w: A = None
        self.txt = txt

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

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

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

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