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

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

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

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

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

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

a = A("a")
i = B("i")
l = C("l")
j = D("j")
n = E("n")
k = F("k")
m = D("m")
f = F("f")

a.v = f
i.s = n
i.x = m
l.r = n
l.u = i
l.y = i
l.s = m
l.q = j
j.z = f
j.v = a
j.u = a
j.x = n
j.q = l
j.y = l
n.x = a
n.p = a
n.u = k
n.o = i
n.v = l
n.t = m
k.w = m
k.t = j
k.y = l
k.q = i
m.z = k
m.v = a
m.u = a
m.x = n
m.q = l
m.y = l
f.w = j
f.t = j
f.y = l
f.q = i
assert l.s.z.t.q.q.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

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

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

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

a = A("a")
i = B("i")
l = C("l")
j = D("j")
n = E("n")
k = F("k")
m = D("m")
f = F("f")

a.v = f
i.s = n
i.x = m
l.r = n
l.u = i
l.y = i
l.s = m
l.q = j
j.z = f
j.v = a
j.u = a
j.x = n
j.q = l
j.y = l
n.x = a
n.p = a
n.u = k
n.o = i
n.v = l
n.t = m
k.w = m
k.t = j
k.y = l
k.q = i
m.z = k
m.v = a
m.u = a
m.x = n
m.q = l
m.y = l
f.w = j
f.t = j
f.y = l
f.q = i
assert l.s.z.t.q.q.txt == "j"