class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: F = None
        self.z: J = None
        self.x: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: B = None
        self.p: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: E = None
        self.p: I = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: A = None
        self.o: C = None
        self.r: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: G = None
        self.q: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: A = None
        self.w: H = None
        self.z: F = None
        self.y: D = None
        self.x: H = None
        self.q: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: B = None
        self.p: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: E = None
        self.p: I = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: A = None
        self.o: C = None
        self.r: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: G = None
        self.q: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: A = None
        self.w: H = None
        self.z: F = None
        self.y: D = None
        self.x: H = None
        self.q: C = None
        self.txt = txt

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

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