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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: J = None
        self.x: H = None
        self.s: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: C = None
        self.q: H = None
        self.w: I = None
        self.o: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: F = None
        self.w: I = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: J = None
        self.x: H = None
        self.s: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: C = None
        self.q: H = None
        self.w: I = None
        self.o: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: F = None
        self.w: I = None
        self.txt = txt

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

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

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

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

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