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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: E = None
        self.y: F = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: B = None
        self.r: H = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: C = None
        self.u: B = None
        self.q: G = None
        self.p: D = None
        self.r: C = None
        self.v: C = None
        self.y: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: E = None
        self.y: F = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: B = None
        self.r: H = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: C = None
        self.u: B = None
        self.q: G = None
        self.p: D = None
        self.r: C = None
        self.v: C = None
        self.y: D = None
        self.txt = txt

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

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

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

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