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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: F = None
        self.z: B = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: B = None
        self.r: D = None
        self.t: C = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: E = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: B = None
        self.y: D = None
        self.x: C = None
        self.txt = txt

m = A("m")
h = B("h")
f = C("f")
b = D("b")
i = E("i")
g = F("g")
e = E("e")
j = B("j")
d = A("d")
c = C("c")

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: F = None
        self.z: B = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: B = None
        self.r: D = None
        self.t: C = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: E = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: B = None
        self.y: D = None
        self.x: C = None
        self.txt = txt

m = A("m")
h = B("h")
f = C("f")
b = D("b")
i = E("i")
g = F("g")
e = E("e")
j = B("j")
d = A("d")
c = C("c")

m.v = d
m.r = d
m.z = i
m.y = f
m.o = b
h.w = c
h.q = g
h.z = j
h.x = b
f.v = c
f.t = c
f.o = j
f.r = b
f.p = e
b.o = c
b.y = e
b.z = i
i.s = d
g.s = b
g.y = b
g.o = h
g.x = c
e.s = m
j.w = c
j.q = g
j.z = h
j.x = b
d.v = m
d.r = m
d.z = e
d.y = f
d.o = b
c.v = f
c.t = f
c.o = h
c.r = b
c.p = e
assert h.x.z.s.z.s.z.s.y.p.txt == "e"