class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: E = None
        self.u: B = None
        self.z: B = None
        self.w: G = None
        self.t: D = None
        self.s: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: A = None
        self.o: C = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: A = None
        self.r: A = None
        self.x: A = None
        self.v: B = None
        self.txt = txt

h = A("h")
i = B("i")
l = C("l")
e = D("e")
a = E("a")
b = F("b")
c = G("c")
g = H("g")
k = C("k")

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: A = None
        self.o: C = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: A = None
        self.r: A = None
        self.x: A = None
        self.v: B = None
        self.txt = txt

h = A("h")
i = B("i")
l = C("l")
e = D("e")
a = E("a")
b = F("b")
c = G("c")
g = H("g")
k = C("k")

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