class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: E = None
        self.u: J = None
        self.q: H = None
        self.r: G = None
        self.t: F = None
        self.p: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: E = None
        self.x: A = None
        self.w: H = None
        self.t: B = None
        self.p: A = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: E = None
        self.x: I = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: B = None
        self.z: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: D = None
        self.y: B = None
        self.z: E = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.v: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: E = None
        self.x: A = None
        self.w: H = None
        self.t: B = None
        self.p: A = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: E = None
        self.x: I = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: B = None
        self.z: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: D = None
        self.y: B = None
        self.z: E = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.v: E = None
        self.txt = txt

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

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

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