class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: G = None
        self.r: C = None
        self.y: G = None
        self.p: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: C = None
        self.o: B = None
        self.txt = txt

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

k = A("k")
f = B("f")
i = C("i")
c = D("c")
h = E("h")
d = F("d")
m = G("m")
e = A("e")

k.o = i
k.r = i
k.s = m
k.y = m
k.p = d
f.r = c
f.v = d
f.s = m
i.v = f
i.u = c
c.v = i
c.w = e
c.x = h
h.x = m
h.o = k
d.s = m
d.z = i
d.o = f
m.o = i
m.s = d
m.y = e
e.o = i
e.r = i
e.s = m
e.y = m
e.p = d
assert m.o.u.w.p.s.s.s.y.txt == "
class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: G = None
        self.r: C = None
        self.y: G = None
        self.p: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: C = None
        self.o: B = None
        self.txt = txt

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

k = A("k")
f = B("f")
i = C("i")
c = D("c")
h = E("h")
d = F("d")
m = G("m")
e = A("e")

k.o = i
k.r = i
k.s = m
k.y = m
k.p = d
f.r = c
f.v = d
f.s = m
i.v = f
i.u = c
c.v = i
c.w = e
c.x = h
h.x = m
h.o = k
d.s = m
d.z = i
d.o = f
m.o = i
m.s = d
m.y = e
e.o = i
e.r = i
e.s = m
e.y = m
e.p = d
assert m.o.u.w.p.s.s.s.y.txt == "e"