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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: C = None
        self.x: A = None
        self.z: A = None
        self.q: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: E = None
        self.v: D = None
        self.o: A = None
        self.u: F = None
        self.txt = txt

g = A("g")
e = B("e")
n = C("n")
c = D("c")
b = E("b")
k = F("k")
f = G("f")
j = B("j")

g.q = n
g.r = f
e.t = g
e.u = g
e.v = g
e.x = g
e.o = n
e.r = n
e.y = k
n.v = b
c.r = b
c.y = n
c.x = g
c.z = g
c.q = f
b.v = j
b.s = c
b.u = g
b.y = n
k.r = n
f.r = k
f.u = k
f.p = b
f.v = c
f.o = g
j.t = g
j.u = g
j.v = g
j.x = g
j.o = n
j.r = n
j.y = k
assert n.v.s.z.r.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: C = None
        self.x: A = None
        self.z: A = None
        self.q: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: E = None
        self.v: D = None
        self.o: A = None
        self.u: F = None
        self.txt = txt

g = A("g")
e = B("e")
n = C("n")
c = D("c")
b = E("b")
k = F("k")
f = G("f")
j = B("j")

g.q = n
g.r = f
e.t = g
e.u = g
e.v = g
e.x = g
e.o = n
e.r = n
e.y = k
n.v = b
c.r = b
c.y = n
c.x = g
c.z = g
c.q = f
b.v = j
b.s = c
b.u = g
b.y = n
k.r = n
f.r = k
f.u = k
f.p = b
f.v = c
f.o = g
j.t = g
j.u = g
j.v = g
j.x = g
j.o = n
j.r = n
j.y = k
assert n.v.s.z.r.u.r.txt == "n"