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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: A = None
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: B = None
        self.q: C = None
        self.p: A = None
        self.r: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: A = None
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: B = None
        self.q: C = None
        self.p: A = None
        self.r: C = None
        self.txt = txt

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

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

j.w = e
j.r = n
j.z = n
j.o = k
j.t = a
j.v = l
n.p = d
n.w = j
n.y = l
l.w = n
l.u = a
l.v = a
l.x = k
l.y = k
l.t = d
e.x = j
e.t = j
e.v = j
e.y = n
e.w = d
e.z = a
k.o = n
k.z = n
k.q = l
k.r = l
k.p = j
d.w = l
c.o = n
c.z = n
c.q = l
c.r = l
c.p = j
a.x = j
a.t = j
a.v = j
a.y = n
a.w = d
a.z = e
assert l.x.p.t.w.w.y.q.txt == "l"