class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.z: F = None
        self.w: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: C = None
        self.t: G = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: J = None
        self.x: I = None
        self.q: G = None
        self.r: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: A = None
        self.s: A = None
        self.o: E = None
        self.r: H = None
        self.p: I = None
        self.q: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: D = None
        self.x: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: G = None
        self.z: D = None
        self.s: A = None
        self.w: F = None
        self.p: C = None
        self.t: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.z: F = None
        self.w: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: C = None
        self.t: G = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: J = None
        self.x: I = None
        self.q: G = None
        self.r: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: A = None
        self.s: A = None
        self.o: E = None
        self.r: H = None
        self.p: I = None
        self.q: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: D = None
        self.x: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: G = None
        self.z: D = None
        self.s: A = None
        self.w: F = None
        self.p: C = None
        self.t: G = None
        self.txt = txt

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

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