class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: H = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: F = None
        self.r: H = None
        self.o: D = None
        self.q: I = None
        self.u: G = None
        self.s: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: G = None
        self.t: H = None
        self.y: G = None
        self.v: D = None
        self.z: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: C = None
        self.r: C = None
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.u: B = None
        self.q: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: H = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: F = None
        self.r: H = None
        self.o: D = None
        self.q: I = None
        self.u: G = None
        self.s: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: G = None
        self.t: H = None
        self.y: G = None
        self.v: D = None
        self.z: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: C = None
        self.r: C = None
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.u: B = None
        self.q: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

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