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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: E = None
        self.x: D = None
        self.t: D = None
        self.o: B = None
        self.txt = txt

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

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

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

f = A("f")
a = B("a")
g = C("g")
e = D("e")
j = E("j")
d = F("d")
i = A("i")
k = F("k")

f.w = g
f.s = e
a.r = f
a.v = f
a.w = f
a.u = f
a.y = j
a.o = g
g.z = k
g.u = j
g.x = e
g.t = e
g.o = a
e.z = a
e.r = a
e.w = i
j.z = f
j.w = g
j.v = i
j.u = a
j.p = e
d.y = k
d.t = f
i.w = g
i.s = e
k.y = d
k.t = f
assert f.s.w.s.w.w.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: E = None
        self.x: D = None
        self.t: D = None
        self.o: B = None
        self.txt = txt

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

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

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

f = A("f")
a = B("a")
g = C("g")
e = D("e")
j = E("j")
d = F("d")
i = A("i")
k = F("k")

f.w = g
f.s = e
a.r = f
a.v = f
a.w = f
a.u = f
a.y = j
a.o = g
g.z = k
g.u = j
g.x = e
g.t = e
g.o = a
e.z = a
e.r = a
e.w = i
j.z = f
j.w = g
j.v = i
j.u = a
j.p = e
d.y = k
d.t = f
i.w = g
i.s = e
k.y = d
k.t = f
assert f.s.w.s.w.w.u.u.txt == "a"