class A:
    def __init__(self, txt: str):
        self.y: J = None
        self.v: B = None
        self.o: I = None
        self.u: D = None
        self.r: H = None
        self.t: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: F = None
        self.p: H = None
        self.y: J = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: E = None
        self.x: C = None
        self.u: G = None
        self.o: H = None
        self.w: C = None
        self.q: H = None
        self.p: C = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: G = None
        self.u: G = None
        self.z: H = None
        self.w: H = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: I = None
        self.w: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: D = None
        self.q: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: F = None
        self.p: H = None
        self.y: J = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: E = None
        self.x: C = None
        self.u: G = None
        self.o: H = None
        self.w: C = None
        self.q: H = None
        self.p: C = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: G = None
        self.u: G = None
        self.z: H = None
        self.w: H = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: I = None
        self.w: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: D = None
        self.q: D = None
        self.txt = txt

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

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