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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: H = None
        self.r: F = None
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: F = None
        self.u: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: G = None
        self.w: F = None
        self.q: E = None
        self.z: F = None
        self.o: A = None
        self.x: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: H = None
        self.r: F = None
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: F = None
        self.u: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: G = None
        self.w: F = None
        self.q: E = None
        self.z: F = None
        self.o: A = None
        self.x: E = None
        self.txt = txt

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

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