class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: D = None
        self.v: E = None
        self.t: F = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: B = None
        self.w: F = None
        self.x: B = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: B = None
        self.w: F = None
        self.x: B = None
        self.z: C = None
        self.txt = txt

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

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