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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: G = None
        self.z: I = None
        self.q: E = None
        self.r: G = None
        self.u: D = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: J = None
        self.w: G = None
        self.u: E = None
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: C = None
        self.z: A = None
        self.w: H = None
        self.y: I = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: H = None
        self.t: G = None
        self.txt = txt

l = A("l")
b = B("b")
a = C("a")
n = D("n")
m = E("m")
i = F("i")
e = G("e")
c = H("c")
g = I("g")
h = J("h")

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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: G = None
        self.z: I = None
        self.q: E = None
        self.r: G = None
        self.u: D = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: J = None
        self.w: G = None
        self.u: E = None
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: C = None
        self.z: A = None
        self.w: H = None
        self.y: I = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: H = None
        self.t: G = None
        self.txt = txt

l = A("l")
b = B("b")
a = C("a")
n = D("n")
m = E("m")
i = F("i")
e = G("e")
c = H("c")
g = I("g")
h = J("h")

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