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

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.x: C = None
        self.w: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: H = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: J = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: F = None
        self.z: I = None
        self.p: I = None
        self.v: D = None
        self.s: A = None
        self.w: D = None
        self.o: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.x: C = None
        self.w: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: H = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: J = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: F = None
        self.z: I = None
        self.p: I = None
        self.v: D = None
        self.s: A = None
        self.w: D = None
        self.o: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

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

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