class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: D = None
        self.z: E = None
        self.t: D = None
        self.w: D = None
        self.y: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: C = None
        self.x: C = None
        self.txt = txt

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

k = A("k")
j = B("j")
d = C("d")
l = D("l")
f = E("f")
e = F("e")

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: C = None
        self.x: C = None
        self.txt = txt

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

k = A("k")
j = B("j")
d = C("d")
l = D("l")
f = E("f")
e = F("e")

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