class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: B = None
        self.p: F = None
        self.o: J = None
        self.q: I = None
        self.w: H = None
        self.r: B = None
        self.z: H = None
        self.t: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: G = None
        self.x: G = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: J = None
        self.y: J = None
        self.x: H = None
        self.u: J = None
        self.p: I = None
        self.w: J = None
        self.t: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: D = None
        self.w: J = None
        self.z: B = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: G = None
        self.w: H = None
        self.o: I = None
        self.x: G = None
        self.r: B = None
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: G = None
        self.x: G = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: J = None
        self.y: J = None
        self.x: H = None
        self.u: J = None
        self.p: I = None
        self.w: J = None
        self.t: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: D = None
        self.w: J = None
        self.z: B = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: G = None
        self.w: H = None
        self.o: I = None
        self.x: G = None
        self.r: B = None
        self.z: C = None
        self.txt = txt

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

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