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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: F = None
        self.p: F = None
        self.r: C = None
        self.v: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: J = None
        self.u: B = None
        self.q: J = None
        self.v: J = None
        self.w: F = None
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: I = None
        self.x: G = None
        self.p: J = None
        self.q: J = None
        self.r: C = None
        self.o: B = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: G = None
        self.v: J = None
        self.u: J = None
        self.w: D = None
        self.p: A = None
        self.r: J = None
        self.y: A = None
        self.q: D = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: F = None
        self.p: F = None
        self.r: C = None
        self.v: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: J = None
        self.u: B = None
        self.q: J = None
        self.v: J = None
        self.w: F = None
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: I = None
        self.x: G = None
        self.p: J = None
        self.q: J = None
        self.r: C = None
        self.o: B = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: G = None
        self.v: J = None
        self.u: J = None
        self.w: D = None
        self.p: A = None
        self.r: J = None
        self.y: A = None
        self.q: D = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: H = None
        self.txt = txt

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

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