class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: H = None
        self.q: G = None
        self.r: E = None
        self.x: B = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: E = None
        self.u: B = None
        self.q: A = None
        self.s: I = None
        self.o: A = None
        self.t: C = None
        self.w: B = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: G = None
        self.w: D = None
        self.r: G = None
        self.s: C = None
        self.v: F = None
        self.t: D = None
        self.y: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: F = None
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: C = None
        self.v: H = None
        self.t: C = None
        self.z: A = None
        self.txt = txt

d = A("d")
g = B("g")
b = C("b")
c = D("c")
a = E("a")
e = F("e")
m = G("m")
h = H("h")
l = I("l")
j = D("j")

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: H = None
        self.q: G = None
        self.r: E = None
        self.x: B = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: E = None
        self.u: B = None
        self.q: A = None
        self.s: I = None
        self.o: A = None
        self.t: C = None
        self.w: B = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: G = None
        self.w: D = None
        self.r: G = None
        self.s: C = None
        self.v: F = None
        self.t: D = None
        self.y: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: F = None
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: C = None
        self.v: H = None
        self.t: C = None
        self.z: A = None
        self.txt = txt

d = A("d")
g = B("g")
b = C("b")
c = D("c")
a = E("a")
e = F("e")
m = G("m")
h = H("h")
l = I("l")
j = D("j")

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