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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: B = None
        self.t: F = None
        self.y: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.w: A = None
        self.x: I = None
        self.y: I = None
        self.q: J = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: J = None
        self.y: G = None
        self.t: B = None
        self.x: I = None
        self.o: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: J = None
        self.v: I = None
        self.p: B = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: D = None
        self.z: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: C = None
        self.u: H = None
        self.q: H = None
        self.p: E = None
        self.v: F = None
        self.z: B = None
        self.s: G = None
        self.t: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: B = None
        self.t: F = None
        self.y: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.w: A = None
        self.x: I = None
        self.y: I = None
        self.q: J = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: J = None
        self.y: G = None
        self.t: B = None
        self.x: I = None
        self.o: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: J = None
        self.v: I = None
        self.p: B = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: D = None
        self.z: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: C = None
        self.u: H = None
        self.q: H = None
        self.p: E = None
        self.v: F = None
        self.z: B = None
        self.s: G = None
        self.t: A = None
        self.txt = txt

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

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