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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: A = None
        self.s: E = None
        self.p: I = None
        self.x: D = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: F = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: C = None
        self.w: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: E = None
        self.s: A = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: H = None
        self.w: D = None
        self.s: G = None
        self.r: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: A = None
        self.s: E = None
        self.p: I = None
        self.x: D = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: F = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: C = None
        self.w: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: E = None
        self.s: A = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: H = None
        self.w: D = None
        self.s: G = None
        self.r: H = None
        self.txt = txt

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

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