class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: C = None
        self.s: C = None
        self.u: A = None
        self.o: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

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