class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: C = None
        self.o: F = None
        self.t: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: F = None
        self.x: F = None
        self.s: C = None
        self.y: A = None
        self.t: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: C = None
        self.q: F = None
        self.s: D = None
        self.z: F = None
        self.y: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: F = None
        self.x: F = None
        self.s: C = None
        self.y: A = None
        self.t: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: C = None
        self.q: F = None
        self.s: D = None
        self.z: F = None
        self.y: E = None
        self.txt = txt

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

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