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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: H = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: G = None
        self.z: G = None
        self.x: B = None
        self.w: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: H = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: G = None
        self.z: G = None
        self.x: B = None
        self.w: B = None
        self.txt = txt

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

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