class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: D = None
        self.v: F = None
        self.q: A = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: D = None
        self.v: F = None
        self.q: A = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

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

f.s = g
l.p = m
l.o = j
l.v = k
l.q = f
l.r = g
g.r = j
g.w = j
g.s = k
g.u = l
j.w = l
m.v = l
k.u = e
k.z = e
k.v = m
e.s = n
n.r = j
n.w = j
n.s = k
n.u = l
assert f.s.w.w.v.u.s.txt == "n"