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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: G = None
        self.y: B = None
        self.x: G = None
        self.r: A = None
        self.u: G = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

i = A("i")
n = B("n")
a = C("a")
k = D("k")
e = E("e")
m = F("m")
f = G("f")
c = F("c")

i.v = n
i.r = f
n.t = a
n.q = k
n.x = f
a.p = e
a.w = c
k.t = n
k.y = n
k.w = f
k.x = f
k.u = f
k.p = f
k.r = i
e.z = n
m.v = e
m.s = a
m.w = n
m.q = k
f.p = e
f.r = e
f.u = a
f.z = a
f.v = i
f.y = n
f.w = c
c.v = e
c.s = a
c.w = n
c.q = k
assert i.v.x.w.s.p.z.x.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: G = None
        self.y: B = None
        self.x: G = None
        self.r: A = None
        self.u: G = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

i = A("i")
n = B("n")
a = C("a")
k = D("k")
e = E("e")
m = F("m")
f = G("f")
c = F("c")

i.v = n
i.r = f
n.t = a
n.q = k
n.x = f
a.p = e
a.w = c
k.t = n
k.y = n
k.w = f
k.x = f
k.u = f
k.p = f
k.r = i
e.z = n
m.v = e
m.s = a
m.w = n
m.q = k
f.p = e
f.r = e
f.u = a
f.z = a
f.v = i
f.y = n
f.w = c
c.v = e
c.s = a
c.w = n
c.q = k
assert i.v.x.w.s.p.z.x.txt == "f"