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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: D = None
        self.o: A = None
        self.w: B = None
        self.y: D = None
        self.x: B = None
        self.txt = txt

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

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

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

m = A("m")
j = B("j")
h = C("h")
k = D("k")
c = E("c")
d = F("d")

m.y = c
m.x = c
m.z = c
m.s = k
m.t = k
m.r = h
j.y = m
j.o = m
j.z = c
j.p = k
j.v = k
h.q = m
h.o = m
h.r = k
h.y = k
h.w = j
h.x = j
k.o = c
k.y = c
k.q = j
k.p = d
c.t = d
d.v = j
d.q = m
assert k.y.t.v.o.txt == "
class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: D = None
        self.x: E = None
        self.r: C = None
        self.z: E = None
        self.t: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: D = None
        self.o: A = None
        self.w: B = None
        self.y: D = None
        self.x: B = None
        self.txt = txt

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

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

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

m = A("m")
j = B("j")
h = C("h")
k = D("k")
c = E("c")
d = F("d")

m.y = c
m.x = c
m.z = c
m.s = k
m.t = k
m.r = h
j.y = m
j.o = m
j.z = c
j.p = k
j.v = k
h.q = m
h.o = m
h.r = k
h.y = k
h.w = j
h.x = j
k.o = c
k.y = c
k.q = j
k.p = d
c.t = d
d.v = j
d.q = m
assert k.y.t.v.o.txt == "m"