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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: A = None
        self.txt = txt

j = A("j")
i = B("i")
g = C("g")
l = D("l")
n = E("n")
m = F("m")
a = G("a")
c = B("c")

j.r = n
i.v = l
i.z = j
i.u = a
i.t = g
g.z = m
g.t = m
l.v = n
l.u = a
n.o = i
n.w = j
n.q = j
n.u = l
n.x = l
n.t = m
m.o = i
m.v = j
m.z = l
m.s = g
a.z = n
a.x = j
c.v = l
c.z = j
c.u = a
c.t = g
assert g.t.o.z.r.o.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: A = None
        self.txt = txt

j = A("j")
i = B("i")
g = C("g")
l = D("l")
n = E("n")
m = F("m")
a = G("a")
c = B("c")

j.r = n
i.v = l
i.z = j
i.u = a
i.t = g
g.z = m
g.t = m
l.v = n
l.u = a
n.o = i
n.w = j
n.q = j
n.u = l
n.x = l
n.t = m
m.o = i
m.v = j
m.z = l
m.s = g
a.z = n
a.x = j
c.v = l
c.z = j
c.u = a
c.t = g
assert g.t.o.z.r.o.v.v.txt == "n"