class A:
    def __init__(self, txt: str):
        self.q: J = None
        self.p: G = None
        self.u: J = None
        self.t: G = None
        self.y: D = None
        self.x: F = None
        self.w: J = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: C = None
        self.y: H = None
        self.w: I = None
        self.o: E = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: J = None
        self.r: I = None
        self.txt = txt

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: I = None
        self.u: H = None
        self.y: H = None
        self.r: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: C = None
        self.y: H = None
        self.w: I = None
        self.o: E = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: J = None
        self.r: I = None
        self.txt = txt

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: I = None
        self.u: H = None
        self.y: H = None
        self.r: F = None
        self.txt = txt

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

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