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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: C = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: A = None
        self.t: H = None
        self.p: H = None
        self.v: A = None
        self.z: A = None
        self.u: A = None
        self.s: A = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: E = None
        self.o: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: C = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: A = None
        self.t: H = None
        self.p: H = None
        self.v: A = None
        self.z: A = None
        self.u: A = None
        self.s: A = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: E = None
        self.o: A = None
        self.txt = txt

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

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