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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: F = None
        self.t: E = None
        self.q: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: E = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: F = None
        self.x: F = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: B = None
        self.x: J = None
        self.s: C = None
        self.o: J = None
        self.y: H = None
        self.r: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: F = None
        self.t: E = None
        self.q: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: E = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: F = None
        self.x: F = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: B = None
        self.x: J = None
        self.s: C = None
        self.o: J = None
        self.y: H = None
        self.r: C = None
        self.txt = txt

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

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

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