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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: B = None
        self.s: B = None
        self.y: B = None
        self.z: C = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: B = None
        self.s: B = None
        self.y: B = None
        self.z: C = None
        self.q: B = None
        self.txt = txt

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

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