class A:
    def __init__(self, txt: str):
        self.z: J = None
        self.o: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: B = None
        self.q: H = None
        self.t: H = None
        self.w: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: G = None
        self.o: D = None
        self.w: G = None
        self.p: B = None
        self.x: G = None
        self.t: E = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: G = None
        self.t: G = None
        self.r: F = None
        self.z: C = None
        self.o: H = None
        self.q: C = None
        self.v: H = None
        self.s: F = None
        self.w: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: B = None
        self.q: H = None
        self.t: H = None
        self.w: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: G = None
        self.o: D = None
        self.w: G = None
        self.p: B = None
        self.x: G = None
        self.t: E = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: G = None
        self.t: G = None
        self.r: F = None
        self.z: C = None
        self.o: H = None
        self.q: C = None
        self.v: H = None
        self.s: F = None
        self.w: G = None
        self.txt = txt

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

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