class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: I = None
        self.x: J = None
        self.v: C = None
        self.u: E = None
        self.y: F = None
        self.q: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: J = None
        self.q: E = None
        self.v: H = None
        self.r: H = None
        self.t: J = None
        self.p: E = None
        self.w: H = None
        self.x: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: A = None
        self.z: D = None
        self.y: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: B = None
        self.x: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: H = None
        self.txt = txt

j = A("j")
i = B("i")
c = C("c")
d = D("d")
g = E("g")
a = F("a")
k = G("k")
e = H("e")
h = I("h")
l = J("l")

j.o = i
j.p = h
j.q = h
j.x = l
j.v = c
j.u = g
j.y = a
i.s = d
i.u = l
i.t = l
i.q = g
i.p = g
i.v = e
i.r = e
i.w = e
i.x = h
c.y = e
c.t = e
c.w = d
c.o = d
c.x = j
c.p = k
c.s = k
c.r = h
d.o = a
g.p = a
g.o = j
g.z = d
g.y = i
a.p = h
a.v = j
a.q = j
a.y = c
a.s = d
k.y = i
k.w = g
e.y = l
e.p = a
e.s = k
h.q = k
h.o = i
h.x = c
l.r = e
l.q = e
assert l.r.y.r.p.q.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: I = None
        self.x: J = None
        self.v: C = None
        self.u: E = None
        self.y: F = None
        self.q: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: J = None
        self.q: E = None
        self.v: H = None
        self.r: H = None
        self.t: J = None
        self.p: E = None
        self.w: H = None
        self.x: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: A = None
        self.z: D = None
        self.y: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: B = None
        self.x: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: H = None
        self.txt = txt

j = A("j")
i = B("i")
c = C("c")
d = D("d")
g = E("g")
a = F("a")
k = G("k")
e = H("e")
h = I("h")
l = J("l")

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