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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

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

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

m = A("m")
i = B("i")
h = C("h")
n = D("n")
e = E("e")
a = F("a")
f = B("f")
d = D("d")
c = A("c")
l = A("l")

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

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

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

m = A("m")
i = B("i")
h = C("h")
n = D("n")
e = E("e")
a = F("a")
f = B("f")
d = D("d")
c = A("c")
l = A("l")

m.y = h
m.w = h
m.x = h
i.s = e
h.v = f
h.o = f
h.x = a
h.p = e
h.s = e
n.r = l
n.z = l
n.t = e
n.x = d
n.q = i
e.q = h
e.w = d
a.p = e
a.u = e
a.y = i
a.o = h
f.s = e
d.r = c
d.z = c
d.t = e
d.x = n
d.q = i
c.y = h
c.w = h
c.x = h
l.y = h
l.w = h
l.x = h
assert i.s.w.q.txt == "i"