class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: G = None
        self.x: A = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: F = None
        self.u: I = None
        self.o: B = None
        self.w: I = None
        self.r: A = None
        self.s: G = None
        self.p: G = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: H = None
        self.u: E = None
        self.o: F = None
        self.p: E = None
        self.t: I = None
        self.x: D = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

h = A("h")
c = B("c")
l = C("l")
e = D("e")
m = E("m")
g = F("g")
d = G("d")
j = H("j")
k = I("k")
i = B("i")

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

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: G = None
        self.x: A = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: F = None
        self.u: I = None
        self.o: B = None
        self.w: I = None
        self.r: A = None
        self.s: G = None
        self.p: G = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: H = None
        self.u: E = None
        self.o: F = None
        self.p: E = None
        self.t: I = None
        self.x: D = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

h = A("h")
c = B("c")
l = C("l")
e = D("e")
m = E("m")
g = F("g")
d = G("d")
j = H("j")
k = I("k")
i = B("i")

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