class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: J = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: D = None
        self.x: D = None
        self.v: A = None
        self.p: F = None
        self.w: E = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: F = None
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: B = None
        self.v: I = None
        self.t: J = None
        self.w: G = None
        self.u: I = None
        self.o: J = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: D = None
        self.x: D = None
        self.v: A = None
        self.p: F = None
        self.w: E = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: F = None
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: B = None
        self.v: I = None
        self.t: J = None
        self.w: G = None
        self.u: I = None
        self.o: J = None
        self.txt = txt

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

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

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

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