class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: B = None
        self.o: E = None
        self.q: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: F = None
        self.x: E = None
        self.q: B = None
        self.w: B = None
        self.o: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: B = None
        self.q: G = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: E = None
        self.q: A = None
        self.u: E = None
        self.s: D = None
        self.txt = txt

h = A("h")
m = B("m")
e = C("e")
a = D("a")
b = E("b")
c = F("c")
f = G("f")
n = H("n")
k = B("k")
g = G("g")

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: F = None
        self.x: E = None
        self.q: B = None
        self.w: B = None
        self.o: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: B = None
        self.q: G = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: E = None
        self.q: A = None
        self.u: E = None
        self.s: D = None
        self.txt = txt

h = A("h")
m = B("m")
e = C("e")
a = D("a")
b = E("b")
c = F("c")
f = G("f")
n = H("n")
k = B("k")
g = G("g")

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