class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: E = None
        self.s: E = None
        self.u: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: C = None
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: F = None
        self.p: G = None
        self.y: G = None
        self.o: F = None
        self.s: C = None
        self.t: I = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: A = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: D = None
        self.x: G = None
        self.y: A = None
        self.z: I = None
        self.v: A = None
        self.p: D = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: C = None
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: F = None
        self.p: G = None
        self.y: G = None
        self.o: F = None
        self.s: C = None
        self.t: I = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: A = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: D = None
        self.x: G = None
        self.y: A = None
        self.z: I = None
        self.v: A = None
        self.p: D = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: A = None
        self.txt = txt

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

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