class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: J = None
        self.u: I = None
        self.t: C = None
        self.s: H = None
        self.r: C = None
        self.x: C = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: I = None
        self.q: J = None
        self.y: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: D = None
        self.r: H = None
        self.v: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: D = None
        self.t: A = None
        self.w: I = None
        self.y: F = None
        self.x: E = None
        self.r: E = None
        self.z: E = None
        self.q: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: F = None
        self.p: B = None
        self.t: A = None
        self.x: J = None
        self.v: H = None
        self.r: A = None
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: I = None
        self.y: F = None
        self.o: E = None
        self.txt = txt

d = A("d")
l = B("l")
b = C("b")
a = D("a")
i = E("i")
k = F("k")
e = G("e")
m = H("m")
n = I("n")
j = J("j")

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: I = None
        self.q: J = None
        self.y: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: D = None
        self.r: H = None
        self.v: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: D = None
        self.t: A = None
        self.w: I = None
        self.y: F = None
        self.x: E = None
        self.r: E = None
        self.z: E = None
        self.q: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: F = None
        self.p: B = None
        self.t: A = None
        self.x: J = None
        self.v: H = None
        self.r: A = None
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: I = None
        self.y: F = None
        self.o: E = None
        self.txt = txt

d = A("d")
l = B("l")
b = C("b")
a = D("a")
i = E("i")
k = F("k")
e = G("e")
m = H("m")
n = I("n")
j = J("j")

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