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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.z: D = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: C = None
        self.r: H = None
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.v: A = None
        self.q: G = None
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: A = None
        self.p: C = None
        self.s: H = None
        self.t: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: F = None
        self.p: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.z: D = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: C = None
        self.r: H = None
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.v: A = None
        self.q: G = None
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: A = None
        self.p: C = None
        self.s: H = None
        self.t: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: F = None
        self.p: B = None
        self.txt = txt

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

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