class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: G = None
        self.r: I = None
        self.w: E = None
        self.x: A = None
        self.p: E = None
        self.q: E = None
        self.z: D = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: G = None
        self.s: J = None
        self.p: I = None
        self.q: C = None
        self.w: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.t: I = None
        self.z: H = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: F = None
        self.u: C = None
        self.t: C = None
        self.txt = txt

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

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

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

d.x = e
d.u = e
g.r = c
g.y = i
g.z = a
h.y = l
h.u = l
h.s = l
h.r = k
h.w = n
h.p = n
h.q = n
h.x = d
h.z = e
e.x = g
e.t = l
e.s = c
e.p = k
e.q = h
e.w = a
n.p = k
n.s = g
n.r = e
i.o = c
i.t = k
i.v = k
i.z = a
l.y = a
a.v = e
a.r = i
a.u = h
a.t = h
k.v = l
k.r = d
k.w = n
k.o = n
k.u = a
k.x = h
k.y = h
k.t = e
k.p = e
k.z = g
c.y = k
c.w = l
c.r = l
assert g.y.z.r.z.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: G = None
        self.r: I = None
        self.w: E = None
        self.x: A = None
        self.p: E = None
        self.q: E = None
        self.z: D = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: G = None
        self.s: J = None
        self.p: I = None
        self.q: C = None
        self.w: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.t: I = None
        self.z: H = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: F = None
        self.u: C = None
        self.t: C = None
        self.txt = txt

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

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

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

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