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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: C = None
        self.t: E = None
        self.z: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: C = None
        self.t: E = None
        self.z: G = None
        self.txt = txt

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

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