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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: C = None
        self.r: G = None
        self.v: C = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: D = None
        self.u: E = None
        self.v: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: C = None
        self.r: G = None
        self.v: C = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: D = None
        self.u: E = None
        self.v: A = None
        self.txt = txt

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

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