class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: C = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: F = None
        self.u: F = None
        self.t: I = None
        self.o: I = None
        self.v: A = None
        self.q: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: E = None
        self.o: B = None
        self.x: H = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: I = None
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: F = None
        self.u: F = None
        self.t: I = None
        self.o: I = None
        self.v: A = None
        self.q: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: E = None
        self.o: B = None
        self.x: H = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: I = None
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: A = None
        self.txt = txt

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

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