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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: G = None
        self.s: C = None
        self.q: F = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: G = None
        self.s: C = None
        self.q: F = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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

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