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

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

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

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

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

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

f = A("f")
l = B("l")
e = C("e")
n = D("n")
k = E("k")
j = F("j")
c = A("c")
g = D("g")
i = C("i")

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

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

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

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

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

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

f = A("f")
l = B("l")
e = C("e")
n = D("n")
k = E("k")
j = F("j")
c = A("c")
g = D("g")
i = C("i")

f.q = k
f.u = k
f.v = k
f.t = l
f.w = n
f.r = j
l.v = k
l.z = j
l.o = j
l.p = i
l.w = f
l.t = f
e.w = f
n.o = l
n.w = l
n.y = e
n.r = j
n.t = g
k.t = j
k.p = j
j.v = g
j.r = n
j.o = e
j.t = l
c.q = k
c.u = k
c.v = k
c.t = l
c.w = g
c.r = j
g.o = l
g.w = l
g.y = i
g.r = j
g.t = n
i.w = c
assert k.t.v.o.v.t.txt == "j"