class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: C = None
        self.s: A = None
        self.p: A = None
        self.x: H = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: B = None
        self.q: A = None
        self.s: B = None
        self.x: D = None
        self.o: I = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: B = None
        self.y: C = None
        self.u: E = None
        self.s: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: D = None
        self.s: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: C = None
        self.s: A = None
        self.p: A = None
        self.x: H = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: B = None
        self.q: A = None
        self.s: B = None
        self.x: D = None
        self.o: I = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: B = None
        self.y: C = None
        self.u: E = None
        self.s: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: D = None
        self.s: F = None
        self.txt = txt

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

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