class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: D = None
        self.q: F = None
        self.t: G = None
        self.z: E = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: A = None
        self.x: H = None
        self.z: D = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: B = None
        self.t: D = None
        self.z: D = None
        self.o: A = None
        self.w: D = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: A = None
        self.v: D = None
        self.u: D = None
        self.s: E = None
        self.x: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: A = None
        self.x: H = None
        self.z: D = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: B = None
        self.t: D = None
        self.z: D = None
        self.o: A = None
        self.w: D = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: A = None
        self.v: D = None
        self.u: D = None
        self.s: E = None
        self.x: B = None
        self.txt = txt

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

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

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