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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: H = None
        self.s: C = None
        self.u: G = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: H = None
        self.s: B = None
        self.x: A = None
        self.q: B = None
        self.y: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: B = None
        self.y: F = None
        self.z: H = None
        self.t: F = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: C = None
        self.t: C = None
        self.r: G = None
        self.p: D = None
        self.x: B = None
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: H = None
        self.s: C = None
        self.u: G = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: H = None
        self.s: B = None
        self.x: A = None
        self.q: B = None
        self.y: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: B = None
        self.y: F = None
        self.z: H = None
        self.t: F = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: C = None
        self.t: C = None
        self.r: G = None
        self.p: D = None
        self.x: B = None
        self.q: A = None
        self.txt = txt

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

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