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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: F = None
        self.txt = txt

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

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