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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: G = None
        self.q: G = None
        self.t: H = None
        self.p: G = None
        self.z: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: C = None
        self.w: F = None
        self.p: G = None
        self.s: G = None
        self.q: C = None
        self.txt = txt

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

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

m = A("m")
d = B("d")
g = C("g")
b = D("b")
j = E("j")
c = F("c")
e = G("e")
h = H("h")
a = E("a")
k = F("k")

m.u = g
m.x = b
m.r = c
m.t = d
d.u = g
d.s = e
d.q = e
d.p = e
d.t = h
d.z = h
g.w = d
b.v = d
b.o = g
b.p = g
b.x = e
b.t = e
j.q = m
j.z = d
c.o = e
c.p = e
c.s = e
c.z = g
c.q = g
c.w = k
e.v = j
h.w = b
h.z = b
h.s = d
a.q = m
a.z = d
k.o = e
k.p = e
k.s = e
k.z = g
k.q = g
k.w = c
assert g.w.p.v.z.q.v.z.t.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: D = None
        self.r: F = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: G = None
        self.q: G = None
        self.t: H = None
        self.p: G = None
        self.z: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: C = None
        self.w: F = None
        self.p: G = None
        self.s: G = None
        self.q: C = None
        self.txt = txt

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

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

m = A("m")
d = B("d")
g = C("g")
b = D("b")
j = E("j")
c = F("c")
e = G("e")
h = H("h")
a = E("a")
k = F("k")

m.u = g
m.x = b
m.r = c
m.t = d
d.u = g
d.s = e
d.q = e
d.p = e
d.t = h
d.z = h
g.w = d
b.v = d
b.o = g
b.p = g
b.x = e
b.t = e
j.q = m
j.z = d
c.o = e
c.p = e
c.s = e
c.z = g
c.q = g
c.w = k
e.v = j
h.w = b
h.z = b
h.s = d
a.q = m
a.z = d
k.o = e
k.p = e
k.s = e
k.z = g
k.q = g
k.w = c
assert g.w.p.v.z.q.v.z.t.s.txt == "d"