class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: D = None
        self.v: G = None
        self.s: D = None
        self.y: C = None
        self.x: F = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: B = None
        self.o: B = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: D = None
        self.y: B = None
        self.v: B = None
        self.o: G = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: A = None
        self.r: G = None
        self.t: G = None
        self.q: F = None
        self.u: F = None
        self.y: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: B = None
        self.o: B = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: D = None
        self.y: B = None
        self.v: B = None
        self.o: G = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: A = None
        self.r: G = None
        self.t: G = None
        self.q: F = None
        self.u: F = None
        self.y: G = None
        self.txt = txt

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

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