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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: E = None
        self.u: B = None
        self.s: B = None
        self.w: B = None
        self.txt = txt

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

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

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

l = A("l")
i = B("i")
g = C("g")
k = D("k")
n = E("n")
e = F("e")
f = F("f")
b = E("b")

l.t = i
l.z = g
l.o = g
l.w = k
i.s = e
i.x = l
g.o = k
g.v = b
g.u = i
g.s = i
g.w = i
k.o = l
n.s = k
n.p = g
e.y = i
f.y = i
b.s = k
b.p = g
assert i.x.w.o.w.o.w.o.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: C = None
        self.o: C = None
        self.w: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: E = None
        self.u: B = None
        self.s: B = None
        self.w: B = None
        self.txt = txt

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

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

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

l = A("l")
i = B("i")
g = C("g")
k = D("k")
n = E("n")
e = F("e")
f = F("f")
b = E("b")

l.t = i
l.z = g
l.o = g
l.w = k
i.s = e
i.x = l
g.o = k
g.v = b
g.u = i
g.s = i
g.w = i
k.o = l
n.s = k
n.p = g
e.y = i
f.y = i
b.s = k
b.p = g
assert i.x.w.o.w.o.w.o.txt == "l"