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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: A = None
        self.r: I = None
        self.q: F = None
        self.x: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: A = None
        self.y: C = None
        self.v: F = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: E = None
        self.u: H = None
        self.w: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: I = None
        self.x: I = None
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: B = None
        self.z: B = None
        self.x: B = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: E = None
        self.v: G = None
        self.txt = txt

m = A("m")
n = B("n")
l = C("l")
k = D("k")
d = E("d")
c = F("c")
a = G("a")
i = H("i")
h = I("h")
f = E("f")

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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: A = None
        self.r: I = None
        self.q: F = None
        self.x: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: A = None
        self.y: C = None
        self.v: F = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: E = None
        self.u: H = None
        self.w: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: I = None
        self.x: I = None
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: B = None
        self.z: B = None
        self.x: B = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: E = None
        self.v: G = None
        self.txt = txt

m = A("m")
n = B("n")
l = C("l")
k = D("k")
d = E("d")
c = F("c")
a = G("a")
i = H("i")
h = I("h")
f = E("f")

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