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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: F = None
        self.o: B = None
        self.x: E = None
        self.w: A = None
        self.z: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: C = None
        self.q: F = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: F = None
        self.o: B = None
        self.x: E = None
        self.w: A = None
        self.z: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: C = None
        self.q: F = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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