class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: G = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: A = None
        self.p: B = None
        self.r: H = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: F = None
        self.s: B = None
        self.x: A = None
        self.r: H = None
        self.u: F = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: B = None
        self.w: A = None
        self.y: E = None
        self.q: A = None
        self.x: D = None
        self.t: G = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: A = None
        self.p: B = None
        self.r: H = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: F = None
        self.s: B = None
        self.x: A = None
        self.r: H = None
        self.u: F = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: B = None
        self.w: A = None
        self.y: E = None
        self.q: A = None
        self.x: D = None
        self.t: G = None
        self.s: B = None
        self.txt = txt

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

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