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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: B = None
        self.z: I = None
        self.t: I = None
        self.r: B = None
        self.q: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: E = None
        self.s: E = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: B = None
        self.o: I = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: B = None
        self.z: I = None
        self.t: I = None
        self.r: B = None
        self.q: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: E = None
        self.s: E = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: B = None
        self.o: I = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: F = None
        self.txt = txt

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

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

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