class A:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: D = None
        self.y: C = None
        self.r: J = None
        self.t: G = None
        self.u: D = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: G = None
        self.w: H = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.o: E = None
        self.q: F = None
        self.x: I = None
        self.v: D = None
        self.t: A = None
        self.u: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: G = None
        self.w: H = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.o: E = None
        self.q: F = None
        self.x: I = None
        self.v: D = None
        self.t: A = None
        self.u: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

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

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