class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: B = None
        self.w: E = None
        self.p: B = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: C = None
        self.w: C = None
        self.v: F = None
        self.t: A = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: A = None
        self.p: A = None
        self.z: F = None
        self.r: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: C = None
        self.w: C = None
        self.v: F = None
        self.t: A = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: A = None
        self.p: A = None
        self.z: F = None
        self.r: B = None
        self.txt = txt

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

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

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