class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: A = None
        self.q: I = None
        self.z: A = None
        self.w: D = None
        self.t: F = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: A = None
        self.q: I = None
        self.z: A = None
        self.w: D = None
        self.t: F = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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