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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: B = None
        self.txt = txt

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

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

n = A("n")
d = B("d")
k = C("k")
c = D("c")
f = E("f")
b = F("b")
g = F("g")
m = D("m")
e = B("e")

n.t = f
n.w = f
n.r = f
n.p = k
n.u = k
d.s = k
d.z = k
d.w = m
d.t = m
k.y = f
k.r = c
k.x = c
k.u = m
k.s = m
c.p = g
c.s = e
f.y = m
f.z = n
f.u = c
f.v = e
f.w = g
b.s = k
b.q = c
b.o = f
g.s = k
g.q = c
g.o = f
m.p = b
m.s = e
e.s = k
e.z = k
e.w = m
e.t = c
assert f.w.s.u.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: C = None
        self.w: E = None
        self.r: E = None
        self.u: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: B = None
        self.txt = txt

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

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

n = A("n")
d = B("d")
k = C("k")
c = D("c")
f = E("f")
b = F("b")
g = F("g")
m = D("m")
e = B("e")

n.t = f
n.w = f
n.r = f
n.p = k
n.u = k
d.s = k
d.z = k
d.w = m
d.t = m
k.y = f
k.r = c
k.x = c
k.u = m
k.s = m
c.p = g
c.s = e
f.y = m
f.z = n
f.u = c
f.v = e
f.w = g
b.s = k
b.q = c
b.o = f
g.s = k
g.q = c
g.o = f
m.p = b
m.s = e
e.s = k
e.z = k
e.w = m
e.t = c
assert f.w.s.u.s.txt == "e"