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

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

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

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

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

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

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

m.z = j
m.o = l
m.w = i
m.r = k
e.x = g
l.t = f
l.p = e
l.y = c
j.p = f
j.u = l
j.z = k
g.y = j
f.s = m
f.z = m
f.p = m
f.x = k
f.y = e
f.v = g
i.x = g
n.y = j
k.z = j
k.o = l
k.w = i
k.r = m
c.t = f
c.p = i
c.y = l
assert e.x.y.p.x.w.x.y.p.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: C = None
        self.w: B = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

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

m.z = j
m.o = l
m.w = i
m.r = k
e.x = g
l.t = f
l.p = e
l.y = c
j.p = f
j.u = l
j.z = k
g.y = j
f.s = m
f.z = m
f.p = m
f.x = k
f.y = e
f.v = g
i.x = g
n.y = j
k.z = j
k.o = l
k.w = i
k.r = m
c.t = f
c.p = i
c.y = l
assert e.x.y.p.x.w.x.y.p.txt == "f"