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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: F = None
        self.s: B = None
        self.v: E = None
        self.u: B = None
        self.p: G = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: F = None
        self.o: E = None
        self.t: A = None
        self.w: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: F = None
        self.s: B = None
        self.v: E = None
        self.u: B = None
        self.p: G = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: F = None
        self.o: E = None
        self.t: A = None
        self.w: C = None
        self.txt = txt

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

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