class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: B = None
        self.q: E = None
        self.y: E = None
        self.u: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: A = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: A = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

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

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