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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: A = None
        self.z: E = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: A = None
        self.z: A = 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.p: A = None
        self.z: A = None
        self.v: B = None
        self.s: B = None
        self.q: B = None
        self.x: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: A = None
        self.z: E = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: A = None
        self.z: A = 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.p: A = None
        self.z: A = None
        self.v: B = None
        self.s: B = None
        self.q: B = None
        self.x: E = None
        self.txt = txt

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

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