class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: C = None
        self.z: E = None
        self.y: E = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: C = None
        self.txt = txt

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

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

k = A("k")
a = B("a")
e = C("e")
l = D("l")
d = E("d")
f = F("f")
b = B("b")
i = C("i")

k.q = f
a.x = d
a.q = b
a.z = k
e.o = b
e.p = i
e.z = d
e.y = d
e.v = k
l.x = a
l.t = i
d.v = i
d.o = f
d.s = f
d.w = k
f.y = k
f.u = d
f.p = l
f.r = a
b.x = d
b.q = a
b.z = k
i.o = a
i.p = e
i.z = d
i.y = d
i.v = k
assert d.o.p.x.q.q.txt == "
class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: C = None
        self.z: E = None
        self.y: E = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: C = None
        self.txt = txt

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

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

k = A("k")
a = B("a")
e = C("e")
l = D("l")
d = E("d")
f = F("f")
b = B("b")
i = C("i")

k.q = f
a.x = d
a.q = b
a.z = k
e.o = b
e.p = i
e.z = d
e.y = d
e.v = k
l.x = a
l.t = i
d.v = i
d.o = f
d.s = f
d.w = k
f.y = k
f.u = d
f.p = l
f.r = a
b.x = d
b.q = a
b.z = k
i.o = a
i.p = e
i.z = d
i.y = d
i.v = k
assert d.o.p.x.q.q.txt == "a"