class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: E = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: G = None
        self.w: F = None
        self.v: A = None
        self.r: I = None
        self.q: A = None
        self.s: B = None
        self.o: B = None
        self.u: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: G = None
        self.w: F = None
        self.v: A = None
        self.r: I = None
        self.q: A = None
        self.s: B = None
        self.o: B = None
        self.u: I = None
        self.txt = txt

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

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

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