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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: F = None
        self.txt = txt

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

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

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

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

n = A("n")
j = B("j")
i = C("i")
h = D("h")
g = E("g")
b = F("b")

n.v = b
n.s = g
n.z = j
n.u = h
j.r = i
j.w = b
i.y = g
i.o = h
h.s = n
h.w = n
h.r = b
g.v = b
g.s = b
g.y = i
g.x = h
b.z = n
b.u = i
b.q = i
b.t = h
assert h.s.u.s.u.w.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: E = None
        self.z: B = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: F = None
        self.txt = txt

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

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

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

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

n = A("n")
j = B("j")
i = C("i")
h = D("h")
g = E("g")
b = F("b")

n.v = b
n.s = g
n.z = j
n.u = h
j.r = i
j.w = b
i.y = g
i.o = h
h.s = n
h.w = n
h.r = b
g.v = b
g.s = b
g.y = i
g.x = h
b.z = n
b.u = i
b.q = i
b.t = h
assert h.s.u.s.u.w.txt == "n"