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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: F = None
        self.r: B = None
        self.w: B = None
        self.txt = txt

c = A("c")
n = B("n")
f = C("f")
a = D("a")
m = E("m")
g = F("g")
h = D("h")
l = C("l")
b = E("b")
e = F("e")

c.o = b
n.s = e
n.z = f
f.t = c
f.o = c
f.w = n
f.y = n
f.x = n
f.s = e
a.t = f
a.y = f
a.z = c
m.y = h
g.p = b
g.u = e
g.r = n
g.w = n
h.t = f
h.z = c
h.y = l
l.t = c
l.o = c
l.w = n
l.y = n
l.x = n
l.s = g
b.y = a
e.p = b
e.u = g
e.r = n
e.w = n
assert m.y.y.o.o.y.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: F = None
        self.r: B = None
        self.w: B = None
        self.txt = txt

c = A("c")
n = B("n")
f = C("f")
a = D("a")
m = E("m")
g = F("g")
h = D("h")
l = C("l")
b = E("b")
e = F("e")

c.o = b
n.s = e
n.z = f
f.t = c
f.o = c
f.w = n
f.y = n
f.x = n
f.s = e
a.t = f
a.y = f
a.z = c
m.y = h
g.p = b
g.u = e
g.r = n
g.w = n
h.t = f
h.z = c
h.y = l
l.t = c
l.o = c
l.w = n
l.y = n
l.x = n
l.s = g
b.y = a
e.p = b
e.u = g
e.r = n
e.w = n
assert m.y.y.o.o.y.t.o.txt == "c"