class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: E = None
        self.w: H = None
        self.t: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: H = None
        self.u: D = None
        self.t: I = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: H = None
        self.z: F = None
        self.y: C = None
        self.q: J = None
        self.t: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: C = None
        self.t: E = None
        self.r: B = None
        self.s: C = None
        self.z: E = None
        self.q: H = None
        self.p: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: H = None
        self.u: D = None
        self.t: I = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: H = None
        self.z: F = None
        self.y: C = None
        self.q: J = None
        self.t: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: C = None
        self.t: E = None
        self.r: B = None
        self.s: C = None
        self.z: E = None
        self.q: H = None
        self.p: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: G = None
        self.txt = txt

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

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