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

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

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: C = None
        self.s: F = None
        self.p: F = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: C = None
        self.s: F = None
        self.p: F = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: F = None
        self.txt = txt

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

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

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