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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: H = None
        self.z: I = None
        self.t: D = None
        self.u: I = None
        self.p: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: B = None
        self.y: H = None
        self.s: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: H = None
        self.z: I = None
        self.t: D = None
        self.u: I = None
        self.p: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: B = None
        self.y: H = None
        self.s: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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