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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: F = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: A = None
        self.p: D = None
        self.u: G = None
        self.x: G = None
        self.z: G = None
        self.s: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: C = None
        self.t: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: F = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: A = None
        self.p: D = None
        self.u: G = None
        self.x: G = None
        self.z: G = None
        self.s: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: C = None
        self.t: C = None
        self.txt = txt

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

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

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