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

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

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

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

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

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

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

i.s = b
a.x = l
a.o = l
a.v = c
n.w = i
n.z = i
n.s = l
b.s = a
h.u = c
h.q = b
h.o = i
g.z = h
g.s = n
c.z = h
c.s = n
l.w = i
l.z = i
l.s = n
assert c.s.w.s.s.v.s.w.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

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

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

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

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

i.s = b
a.x = l
a.o = l
a.v = c
n.w = i
n.z = i
n.s = l
b.s = a
h.u = c
h.q = b
h.o = i
g.z = h
g.s = n
c.z = h
c.s = n
l.w = i
l.z = i
l.s = n
assert c.s.w.s.s.v.s.w.s.txt == "b"