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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: G = None
        self.u: C = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.p: J = None
        self.u: D = None
        self.z: B = None
        self.y: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: F = None
        self.r: G = None
        self.y: B = None
        self.u: B = None
        self.p: F = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: E = None
        self.v: J = None
        self.z: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: G = None
        self.u: C = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.p: J = None
        self.u: D = None
        self.z: B = None
        self.y: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: F = None
        self.r: G = None
        self.y: B = None
        self.u: B = None
        self.p: F = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: E = None
        self.v: J = None
        self.z: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: H = None
        self.txt = txt

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

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