class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: G = None
        self.u: B = None
        self.y: E = None
        self.x: D = None
        self.s: I = None
        self.r: E = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: D = None
        self.y: E = None
        self.x: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: F = None
        self.y: A = None
        self.v: H = None
        self.x: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: D = None
        self.y: E = None
        self.x: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: F = None
        self.y: A = None
        self.v: H = None
        self.x: H = None
        self.txt = txt

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

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

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

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