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

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

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: F = None
        self.z: G = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: A = None
        self.p: B = None
        self.t: C = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: F = None
        self.x: I = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: J = None
        self.w: H = None
        self.s: D = None
        self.r: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: I = None
        self.y: D = None
        self.s: B = None
        self.w: J = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: F = None
        self.z: G = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: A = None
        self.p: B = None
        self.t: C = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: F = None
        self.x: I = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: J = None
        self.w: H = None
        self.s: D = None
        self.r: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: I = None
        self.y: D = None
        self.s: B = None
        self.w: J = None
        self.txt = txt

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

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

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

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