class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: C = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: C = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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