class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: B = None
        self.y: B = None
        self.p: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: A = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: B = None
        self.t: A = None
        self.txt = txt

d = A("d")
j = B("j")
g = C("g")
e = D("e")
f = E("f")
h = F("h")
l = G("l")
k = H("k")
n = G("n")

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: A = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: B = None
        self.t: A = None
        self.txt = txt

d = A("d")
j = B("j")
g = C("g")
e = D("e")
f = E("f")
h = F("h")
l = G("l")
k = H("k")
n = G("n")

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