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

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: F = None
        self.u: C = None
        self.y: E = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: B = None
        self.o: H = None
        self.u: F = None
        self.t: C = None
        self.v: D = None
        self.y: B = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: E = None
        self.y: C = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.q: H = None
        self.y: I = None
        self.z: E = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: F = None
        self.u: C = None
        self.y: E = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: B = None
        self.o: H = None
        self.u: F = None
        self.t: C = None
        self.v: D = None
        self.y: B = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: E = None
        self.y: C = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.q: H = None
        self.y: I = None
        self.z: E = None
        self.w: A = None
        self.txt = txt

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

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

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

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