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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: F = None
        self.v: G = None
        self.s: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: F = None
        self.v: F = None
        self.u: G = None
        self.q: C = None
        self.o: F = None
        self.txt = txt

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

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

j = A("j")
b = B("b")
k = C("k")
d = D("d")
e = E("e")
i = F("i")
l = G("l")
m = A("m")

j.v = b
j.u = l
j.z = i
j.w = d
b.q = k
b.r = l
k.p = d
k.z = i
k.v = l
k.s = b
d.q = j
e.y = l
e.u = l
e.r = i
e.v = i
e.o = i
e.q = k
i.s = b
i.z = b
i.u = b
i.y = d
i.x = d
i.t = l
l.y = k
l.t = e
l.z = e
l.v = b
l.u = j
m.v = b
m.u = l
m.z = i
m.w = d
assert d.q.u.v.r.z.o.y.q.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: G = None
        self.z: F = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: F = None
        self.v: G = None
        self.s: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: F = None
        self.v: F = None
        self.u: G = None
        self.q: C = None
        self.o: F = None
        self.txt = txt

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

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

j = A("j")
b = B("b")
k = C("k")
d = D("d")
e = E("e")
i = F("i")
l = G("l")
m = A("m")

j.v = b
j.u = l
j.z = i
j.w = d
b.q = k
b.r = l
k.p = d
k.z = i
k.v = l
k.s = b
d.q = j
e.y = l
e.u = l
e.r = i
e.v = i
e.o = i
e.q = k
i.s = b
i.z = b
i.u = b
i.y = d
i.x = d
i.t = l
l.y = k
l.t = e
l.z = e
l.v = b
l.u = j
m.v = b
m.u = l
m.z = i
m.w = d
assert d.q.u.v.r.z.o.y.q.txt == "j"