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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: E = None
        self.r: F = None
        self.x: E = None
        self.z: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: E = None
        self.q: B = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: E = None
        self.r: F = None
        self.x: E = None
        self.z: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: E = None
        self.q: B = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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