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

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

class C:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: E = None
        self.s: A = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

l = A("l")
b = B("b")
e = C("e")
i = D("i")
j = E("j")
h = F("h")
k = A("k")
f = C("f")
n = D("n")

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

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

class C:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: E = None
        self.s: A = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

l = A("l")
b = B("b")
e = C("e")
i = D("i")
j = E("j")
h = F("h")
k = A("k")
f = C("f")
n = D("n")

l.q = h
l.x = h
l.u = h
l.w = k
l.y = f
l.z = b
b.v = l
b.x = j
b.s = j
b.t = f
b.y = f
b.p = i
e.z = f
e.u = j
e.s = l
e.v = k
i.y = f
j.s = h
j.p = b
j.w = b
j.r = e
h.x = e
h.q = b
h.z = i
h.u = k
k.q = h
k.x = h
k.u = h
k.w = l
k.y = e
k.z = b
f.z = e
f.u = j
f.s = k
f.v = k
n.y = e
assert j.s.x.v.y.z.txt == "f"