class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: B = None
        self.r: F = None
        self.t: F = None
        self.v: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: C = None
        self.o: E = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: D = None
        self.w: F = None
        self.r: E = None
        self.x: D = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: C = None
        self.r: E = None
        self.t: B = None
        self.txt = txt

n = A("n")
b = B("b")
d = C("d")
h = D("h")
l = E("l")
k = F("k")
a = E("a")
e = A("e")
c = C("c")
m = B("m")

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: C = None
        self.o: E = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: D = None
        self.w: F = None
        self.r: E = None
        self.x: D = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: C = None
        self.r: E = None
        self.t: B = None
        self.txt = txt

n = A("n")
b = B("b")
d = C("d")
h = D("h")
l = E("l")
k = F("k")
a = E("a")
e = A("e")
c = C("c")
m = B("m")

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