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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: E = None
        self.o: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: E = None
        self.o: G = None
        self.v: J = None
        self.w: D = None
        self.z: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: E = None
        self.o: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: E = None
        self.o: G = None
        self.v: J = None
        self.w: D = None
        self.z: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: D = None
        self.txt = txt

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

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