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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: G = None
        self.q: C = None
        self.t: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: C = None
        self.x: D = None
        self.z: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: G = None
        self.q: C = None
        self.t: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: C = None
        self.x: D = None
        self.z: D = None
        self.txt = txt

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

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