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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: A = None
        self.z: D = None
        self.x: A = None
        self.s: F = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: E = None
        self.r: E = None
        self.o: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: A = None
        self.z: D = None
        self.x: A = None
        self.s: F = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: E = None
        self.r: E = None
        self.o: B = None
        self.txt = txt

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

g.o = l
g.s = m
g.w = b
g.v = b
g.y = a
g.q = i
l.v = k
m.y = i
i.s = g
i.u = g
i.y = b
i.o = e
i.q = l
a.t = e
a.v = e
a.w = g
a.x = g
a.z = i
a.s = b
b.p = e
b.s = a
b.r = a
b.o = k
e.s = g
e.u = g
e.y = b
e.o = i
e.q = k
k.v = l
assert a.z.q.v.v.txt == "l"