class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: D = None
        self.u: C = None
        self.v: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: B = None
        self.u: B = None
        self.q: B = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: B = None
        self.u: B = None
        self.q: B = None
        self.s: A = None
        self.txt = txt

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

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

g.o = m
g.s = f
g.v = f
g.u = h
n.s = m
n.t = k
n.w = f
h.w = f
h.u = m
h.z = k
h.v = k
h.t = g
h.s = d
f.r = m
f.y = g
m.t = c
m.r = n
m.u = n
m.q = n
m.s = g
c.v = m
c.y = f
c.t = h
a.v = m
a.y = f
a.t = h
d.o = m
d.s = f
d.v = f
d.u = h
k.w = f
k.u = m
k.z = h
k.v = h
k.t = d
k.s = g
assert f.y.s.r.u.s.r.w.r.txt == "m"