class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.q: I = None
        self.z: I = None
        self.y: J = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.r: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: A = None
        self.q: H = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.q: I = None
        self.z: I = None
        self.y: J = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.r: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: A = None
        self.q: H = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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