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

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

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

j.z = i
j.p = i
j.o = i
j.y = m
j.w = m
k.v = f
k.q = f
k.p = e
k.w = d
k.x = m
e.z = i
e.r = i
e.q = j
e.t = d
e.x = k
c.z = j
d.z = i
m.w = c
m.p = c
m.r = d
m.z = i
f.v = k
f.q = k
f.p = i
f.w = d
f.x = l
i.z = e
i.r = e
i.q = j
i.t = d
i.x = f
l.w = c
l.p = c
l.r = d
l.z = i
assert l.z.t.z.q.y.z.z.x.txt == "k"