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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.r: J = None
        self.q: C = None
        self.p: C = None
        self.v: G = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: B = None
        self.o: G = None
        self.z: E = None
        self.t: J = None
        self.v: E = None
        self.r: F = None
        self.q: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: C = None
        self.u: A = None
        self.r: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.r: J = None
        self.q: C = None
        self.p: C = None
        self.v: G = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: B = None
        self.o: G = None
        self.z: E = None
        self.t: J = None
        self.v: E = None
        self.r: F = None
        self.q: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: C = None
        self.u: A = None
        self.r: G = None
        self.txt = txt

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

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