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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: I = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: C = None
        self.y: C = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: H = None
        self.t: H = None
        self.y: H = None
        self.w: F = None
        self.u: G = None
        self.s: H = None
        self.v: F = None
        self.q: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: I = None
        self.o: C = None
        self.u: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: C = None
        self.o: D = None
        self.y: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: H = None
        self.w: F = None
        self.z: H = None
        self.p: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: I = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: C = None
        self.y: C = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: H = None
        self.t: H = None
        self.y: H = None
        self.w: F = None
        self.u: G = None
        self.s: H = None
        self.v: F = None
        self.q: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: I = None
        self.o: C = None
        self.u: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: C = None
        self.o: D = None
        self.y: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: H = None
        self.w: F = None
        self.z: H = None
        self.p: E = None
        self.txt = txt

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

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

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