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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: A = None
        self.s: B = None
        self.o: D = None
        self.w: A = None
        self.u: C = None
        self.txt = txt

k = A("k")
l = B("l")
d = C("d")
m = D("m")
i = E("i")
j = F("j")

k.x = d
k.u = l
k.y = l
k.z = l
k.s = l
l.v = j
l.w = k
l.p = i
l.y = d
d.o = j
d.t = k
d.z = k
d.p = l
d.y = m
m.u = i
m.z = j
m.q = j
m.w = l
i.v = j
j.q = l
j.s = l
j.p = k
j.w = k
j.o = m
j.u = d
assert m.w.y.z.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: B = None
        self.y: B = None
        self.z: B = None
        self.s: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: A = None
        self.s: B = None
        self.o: D = None
        self.w: A = None
        self.u: C = None
        self.txt = txt

k = A("k")
l = B("l")
d = C("d")
m = D("m")
i = E("i")
j = F("j")

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