class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: F = None
        self.t: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: E = None
        self.p: E = None
        self.txt = txt

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

b.s = m
b.w = h
b.t = l
l.t = b
l.s = b
l.o = b
l.z = m
l.y = h
l.p = n
f.u = b
f.y = b
f.z = n
n.z = b
n.s = b
n.o = l
n.r = m
e.w = l
e.u = b
e.o = b
e.y = f
h.z = e
h.r = e
h.p = e
m.t = b
m.s = b
m.o = b
m.z = l
m.y = h
m.p = n
assert f.y.s.y.z.y.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: F = None
        self.t: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: E = None
        self.p: E = None
        self.txt = txt

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

b.s = m
b.w = h
b.t = l
l.t = b
l.s = b
l.o = b
l.z = m
l.y = h
l.p = n
f.u = b
f.y = b
f.z = n
n.z = b
n.s = b
n.o = l
n.r = m
e.w = l
e.u = b
e.o = b
e.y = f
h.z = e
h.r = e
h.p = e
m.t = b
m.s = b
m.o = b
m.z = l
m.y = h
m.p = n
assert f.y.s.y.z.y.txt == "f"