class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: H = None
        self.o: E = None
        self.q: H = None
        self.r: E = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: B = None
        self.o: A = None
        self.p: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: B = None
        self.q: B = None
        self.t: I = None
        self.o: C = None
        self.y: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: H = None
        self.o: E = None
        self.q: H = None
        self.r: E = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: B = None
        self.o: A = None
        self.p: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: B = None
        self.q: B = None
        self.t: I = None
        self.o: C = None
        self.y: C = None
        self.txt = txt

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

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

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