class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: E = None
        self.t: C = None
        self.r: E = None
        self.s: F = None
        self.u: E = None
        self.w: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: F = None
        self.p: B = None
        self.s: B = None
        self.u: A = None
        self.q: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: D = None
        self.s: B = None
        self.o: D = None
        self.x: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: F = None
        self.p: B = None
        self.s: B = None
        self.u: A = None
        self.q: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: D = None
        self.s: B = None
        self.o: D = None
        self.x: A = None
        self.txt = txt

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

n.x = f
n.s = f
n.v = i
n.u = i
n.t = d
n.r = e
n.w = c
m.y = d
m.v = a
d.s = c
d.w = n
d.u = f
a.t = d
a.q = d
a.y = f
a.p = m
a.s = m
a.u = n
i.w = c
i.p = m
i.v = h
f.s = e
c.q = f
c.t = a
c.o = a
c.s = m
c.x = n
h.q = f
h.t = a
h.o = a
h.s = m
h.x = n
e.w = c
e.p = m
e.v = h
assert m.y.u.s.v.o.s.y.w.s.txt == "f"