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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: H = None
        self.p: E = None
        self.r: C = None
        self.q: A = None
        self.u: C = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: I = None
        self.u: H = None
        self.s: H = None
        self.y: F = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: G = None
        self.r: A = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: J = None
        self.z: F = None
        self.u: A = None
        self.x: H = None
        self.r: I = None
        self.q: D = None
        self.y: J = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: E = None
        self.o: I = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: G = None
        self.u: B = None
        self.r: H = None
        self.p: H = None
        self.q: G = None
        self.z: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: G = None
        self.w: I = None
        self.v: D = None
        self.q: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: H = None
        self.p: E = None
        self.r: C = None
        self.q: A = None
        self.u: C = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: I = None
        self.u: H = None
        self.s: H = None
        self.y: F = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: G = None
        self.r: A = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: J = None
        self.z: F = None
        self.u: A = None
        self.x: H = None
        self.r: I = None
        self.q: D = None
        self.y: J = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: E = None
        self.o: I = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: G = None
        self.u: B = None
        self.r: H = None
        self.p: H = None
        self.q: G = None
        self.z: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: G = None
        self.w: I = None
        self.v: D = None
        self.q: B = None
        self.txt = txt

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

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