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

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

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

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

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

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

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

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

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

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

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

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

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

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

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