class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: C = None
        self.o: I = None
        self.x: D = None
        self.r: B = None
        self.q: C = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: C = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: H = None
        self.u: E = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: F = None
        self.z: I = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: B = None
        self.r: I = None
        self.o: B = None
        self.v: H = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: E = None
        self.v: I = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: D = None
        self.r: E = None
        self.v: E = None
        self.w: I = None
        self.o: H = None
        self.u: A = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: F = None
        self.r: A = None
        self.v: I = None
        self.x: G = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: C = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: H = None
        self.u: E = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: F = None
        self.z: I = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: B = None
        self.r: I = None
        self.o: B = None
        self.v: H = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: E = None
        self.v: I = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: D = None
        self.r: E = None
        self.v: E = None
        self.w: I = None
        self.o: H = None
        self.u: A = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: F = None
        self.r: A = None
        self.v: I = None
        self.x: G = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: F = None
        self.txt = txt

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

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