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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: C = None
        self.z: F = None
        self.s: D = None
        self.w: E = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: F = None
        self.x: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: E = None
        self.z: C = None
        self.t: G = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: C = None
        self.z: F = None
        self.s: D = None
        self.w: E = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: F = None
        self.x: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: E = None
        self.z: C = None
        self.t: G = None
        self.s: G = None
        self.txt = txt

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

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

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