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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: C = None
        self.o: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: B = None
        self.w: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: E = None
        self.s: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: C = None
        self.o: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: B = None
        self.w: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: E = None
        self.s: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: B = None
        self.txt = txt

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

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