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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: F = None
        self.z: F = None
        self.y: D = None
        self.s: A = None
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: F = None
        self.r: A = None
        self.s: A = None
        self.v: C = None
        self.u: B = None
        self.txt = txt

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

m = A("m")
k = B("k")
f = C("f")
n = D("n")
c = E("c")
h = F("h")
a = B("a")
e = A("e")
i = E("i")

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: F = None
        self.z: F = None
        self.y: D = None
        self.s: A = None
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: F = None
        self.r: A = None
        self.s: A = None
        self.v: C = None
        self.u: B = None
        self.txt = txt

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

m = A("m")
k = B("k")
f = C("f")
n = D("n")
c = E("c")
h = F("h")
a = B("a")
e = A("e")
i = E("i")

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