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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: F = None
        self.txt = txt

l = A("l")
c = B("c")
a = C("a")
g = D("g")
i = E("i")
f = F("f")
m = A("m")
d = C("d")
e = F("e")
k = E("k")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: F = None
        self.txt = txt

l = A("l")
c = B("c")
a = C("a")
g = D("g")
i = E("i")
f = F("f")
m = A("m")
d = C("d")
e = F("e")
k = E("k")

l.q = k
l.t = k
l.o = m
l.v = m
l.u = c
l.z = a
c.s = f
c.o = f
c.x = f
c.q = f
c.v = l
c.y = g
a.r = f
a.p = g
a.t = i
a.y = e
a.v = e
g.o = d
g.u = d
g.t = l
g.r = c
g.w = c
g.q = f
i.t = g
i.v = g
i.z = f
f.q = c
f.r = e
m.q = k
m.o = l
m.v = l
m.u = c
m.t = i
m.z = d
d.r = e
d.v = e
d.p = g
d.t = k
d.y = f
e.q = c
e.r = f
k.t = g
k.v = g
k.z = e
assert a.v.r.q.q.r.r.r.r.txt == "f"