class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: B = None
        self.p: D = None
        self.x: C = None
        self.v: B = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: F = None
        self.x: E = None
        self.u: D = None
        self.z: C = None
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: E = None
        self.z: F = None
        self.w: D = None
        self.p: C = None
        self.q: C = None
        self.txt = txt

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

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

l.z = f
l.p = f
l.s = f
l.r = c
l.v = c
l.x = j
c.r = i
c.q = d
c.x = b
c.u = f
c.v = f
c.z = j
j.s = d
j.q = c
j.z = c
j.v = a
f.w = k
f.q = d
b.v = j
b.y = n
b.z = d
b.w = f
b.p = a
b.q = a
d.q = k
i.v = j
i.y = b
i.z = d
i.w = f
i.p = a
i.q = a
k.z = f
k.p = f
k.s = f
k.r = c
k.v = c
k.x = j
n.v = a
n.p = a
n.q = a
n.y = b
n.z = d
n.w = f
a.s = d
a.q = c
a.z = c
a.v = j
assert k.s.q.q.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: B = None
        self.p: D = None
        self.x: C = None
        self.v: B = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: F = None
        self.x: E = None
        self.u: D = None
        self.z: C = None
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: E = None
        self.z: F = None
        self.w: D = None
        self.p: C = None
        self.q: C = None
        self.txt = txt

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

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

l.z = f
l.p = f
l.s = f
l.r = c
l.v = c
l.x = j
c.r = i
c.q = d
c.x = b
c.u = f
c.v = f
c.z = j
j.s = d
j.q = c
j.z = c
j.v = a
f.w = k
f.q = d
b.v = j
b.y = n
b.z = d
b.w = f
b.p = a
b.q = a
d.q = k
i.v = j
i.y = b
i.z = d
i.w = f
i.p = a
i.q = a
k.z = f
k.p = f
k.s = f
k.r = c
k.v = c
k.x = j
n.v = a
n.p = a
n.q = a
n.y = b
n.z = d
n.w = f
a.s = d
a.q = c
a.z = c
a.v = j
assert k.s.q.q.txt == "k"