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

class B:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: E = None
        self.t: B = None
        self.p: G = None
        self.w: C = None
        self.q: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: B = None
        self.v: D = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: E = None
        self.t: B = None
        self.p: G = None
        self.w: C = None
        self.q: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: B = None
        self.v: D = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: B = None
        self.txt = txt

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

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

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