class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: C = None
        self.t: C = None
        self.w: F = None
        self.y: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: E = None
        self.y: C = None
        self.o: F = None
        self.x: F = None
        self.v: A = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: E = None
        self.y: C = None
        self.o: F = None
        self.x: F = None
        self.v: A = None
        self.txt = txt

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

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

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