class A:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: I = None
        self.u: J = None
        self.p: J = None
        self.y: J = None
        self.t: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: I = None
        self.w: H = None
        self.t: G = None
        self.o: H = None
        self.p: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: I = None
        self.u: A = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: C = None
        self.s: F = None
        self.u: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: I = None
        self.w: H = None
        self.t: G = None
        self.o: H = None
        self.p: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: I = None
        self.u: A = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: C = None
        self.s: F = None
        self.u: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: C = None
        self.txt = txt

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

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