class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: J = None
        self.w: A = None
        self.q: C = None
        self.y: F = None
        self.v: B = None
        self.o: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: I = None
        self.y: A = None
        self.s: J = None
        self.o: B = None
        self.z: I = None
        self.w: I = None
        self.x: D = None
        self.r: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: G = None
        self.o: C = None
        self.r: C = None
        self.u: A = None
        self.s: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: J = None
        self.w: A = None
        self.q: C = None
        self.y: F = None
        self.v: B = None
        self.o: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: I = None
        self.y: A = None
        self.s: J = None
        self.o: B = None
        self.z: I = None
        self.w: I = None
        self.x: D = None
        self.r: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: G = None
        self.o: C = None
        self.r: C = None
        self.u: A = None
        self.s: F = None
        self.txt = txt

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

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