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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: J = None
        self.z: E = None
        self.w: H = None
        self.p: D = None
        self.x: F = None
        self.s: I = None
        self.y: E = None
        self.u: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: C = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: B = None
        self.s: D = None
        self.u: J = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: A = None
        self.s: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: G = None
        self.w: G = None
        self.o: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: J = None
        self.z: E = None
        self.w: H = None
        self.p: D = None
        self.x: F = None
        self.s: I = None
        self.y: E = None
        self.u: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: C = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: B = None
        self.s: D = None
        self.u: J = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: A = None
        self.s: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: G = None
        self.w: G = None
        self.o: D = None
        self.txt = txt

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

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