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

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

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: G = None
        self.v: C = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: G = None
        self.v: C = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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