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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: C = None
        self.s: E = None
        self.v: E = None
        self.y: G = None
        self.x: C = None
        self.r: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: C = None
        self.t: G = None
        self.p: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: E = None
        self.p: C = None
        self.u: D = None
        self.r: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: C = None
        self.s: E = None
        self.v: E = None
        self.y: G = None
        self.x: C = None
        self.r: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: C = None
        self.t: G = None
        self.p: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: E = None
        self.p: C = None
        self.u: D = None
        self.r: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: A = None
        self.txt = txt

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

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

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

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