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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: A = None
        self.x: E = None
        self.u: A = None
        self.r: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: E = None
        self.p: A = None
        self.s: C = None
        self.o: C = None
        self.txt = txt

e = A("e")
m = B("m")
g = C("g")
b = D("b")
n = E("n")
h = F("h")

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: A = None
        self.x: E = None
        self.u: A = None
        self.r: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: E = None
        self.p: A = None
        self.s: C = None
        self.o: C = None
        self.txt = txt

e = A("e")
m = B("m")
g = C("g")
b = D("b")
n = E("n")
h = F("h")

e.z = b
e.o = b
e.u = m
e.y = g
m.o = e
m.s = e
m.p = e
m.t = n
g.p = n
g.x = n
g.r = n
g.w = e
g.u = e
b.r = n
b.t = h
b.y = e
n.y = g
n.z = b
n.v = e
h.r = n
h.u = n
h.p = e
h.s = g
h.o = g
assert b.y.y.u.o.r.txt == "n"