class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: J = None
        self.z: B = None
        self.w: D = None
        self.o: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: G = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: J = None
        self.x: D = None
        self.q: H = None
        self.p: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: G = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: J = None
        self.x: D = None
        self.q: H = None
        self.p: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

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

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