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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: A = None
        self.t: I = None
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: C = None
        self.o: G = None
        self.s: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: A = None
        self.t: I = None
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: C = None
        self.o: G = None
        self.s: D = None
        self.txt = txt

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

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

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