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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: J = None
        self.u: J = None
        self.v: A = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.v: D = None
        self.y: A = None
        self.p: E = None
        self.x: D = None
        self.s: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: A = None
        self.w: E = None
        self.s: J = None
        self.z: E = None
        self.u: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: B = None
        self.q: I = None
        self.u: G = None
        self.p: D = None
        self.o: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: I = None
        self.r: A = None
        self.u: E = None
        self.t: F = None
        self.x: E = None
        self.y: I = None
        self.z: F = None
        self.o: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: J = None
        self.u: J = None
        self.v: A = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.v: D = None
        self.y: A = None
        self.p: E = None
        self.x: D = None
        self.s: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: A = None
        self.w: E = None
        self.s: J = None
        self.z: E = None
        self.u: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: B = None
        self.q: I = None
        self.u: G = None
        self.p: D = None
        self.o: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: I = None
        self.r: A = None
        self.u: E = None
        self.t: F = None
        self.x: E = None
        self.y: I = None
        self.z: F = None
        self.o: B = None
        self.txt = txt

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

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