class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: G = None
        self.u: F = None
        self.t: G = None
        self.w: G = None
        self.y: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: H = None
        self.r: D = None
        self.u: C = None
        self.o: G = None
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: G = None
        self.q: C = None
        self.z: E = None
        self.x: A = None
        self.u: F = None
        self.v: G = None
        self.w: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: G = None
        self.u: F = None
        self.t: G = None
        self.w: G = None
        self.y: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: H = None
        self.r: D = None
        self.u: C = None
        self.o: G = None
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: G = None
        self.q: C = None
        self.z: E = None
        self.x: A = None
        self.u: F = None
        self.v: G = None
        self.w: F = None
        self.txt = txt

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

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