class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: B = None
        self.x: A = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: A = None
        self.z: D = None
        self.o: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: A = None
        self.z: D = None
        self.o: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: D = None
        self.txt = txt

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

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

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

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