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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: E = None
        self.t: A = None
        self.z: H = None
        self.s: B = None
        self.w: H = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: F = None
        self.v: C = None
        self.u: B = None
        self.p: B = None
        self.x: C = None
        self.z: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: B = None
        self.x: A = None
        self.u: B = None
        self.p: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: E = None
        self.t: A = None
        self.z: H = None
        self.s: B = None
        self.w: H = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: F = None
        self.v: C = None
        self.u: B = None
        self.p: B = None
        self.x: C = None
        self.z: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: B = None
        self.x: A = None
        self.u: B = None
        self.p: B = None
        self.txt = txt

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

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