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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

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

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

c = A("c")
l = B("l")
f = C("f")
k = D("k")
h = E("h")
d = F("d")
e = C("e")
a = F("a")
g = A("g")

c.s = l
c.o = a
c.y = g
l.z = h
f.q = e
f.v = l
f.x = l
k.t = f
h.s = k
d.x = k
d.s = e
d.z = g
d.o = g
e.q = f
e.v = l
e.x = l
a.x = k
a.s = e
a.z = c
a.o = c
g.s = l
g.o = a
g.y = c
assert l.z.s.t.x.z.s.t.v.z.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: F = None
        self.y: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

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

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

c = A("c")
l = B("l")
f = C("f")
k = D("k")
h = E("h")
d = F("d")
e = C("e")
a = F("a")
g = A("g")

c.s = l
c.o = a
c.y = g
l.z = h
f.q = e
f.v = l
f.x = l
k.t = f
h.s = k
d.x = k
d.s = e
d.z = g
d.o = g
e.q = f
e.v = l
e.x = l
a.x = k
a.s = e
a.z = c
a.o = c
g.s = l
g.o = a
g.y = c
assert l.z.s.t.x.z.s.t.v.z.txt == "h"