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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: D = None
        self.r: F = None
        self.z: E = None
        self.p: C = None
        self.y: C = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: E = None
        self.p: A = None
        self.o: H = None
        self.t: F = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: A = None
        self.w: D = None
        self.q: H = None
        self.v: E = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: H = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: F = None
        self.q: B = None
        self.s: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: D = None
        self.r: F = None
        self.z: E = None
        self.p: C = None
        self.y: C = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: E = None
        self.p: A = None
        self.o: H = None
        self.t: F = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: A = None
        self.w: D = None
        self.q: H = None
        self.v: E = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: H = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: F = None
        self.q: B = None
        self.s: D = None
        self.txt = txt

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

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

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