class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: E = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: D = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: A = None
        self.w: B = None
        self.x: G = None
        self.s: B = None
        self.z: F = None
        self.q: E = None
        self.v: B = None
        self.r: J = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: B = None
        self.o: G = None
        self.x: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: D = None
        self.w: I = None
        self.x: D = None
        self.q: D = None
        self.p: D = None
        self.r: G = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: J = None
        self.p: D = None
        self.o: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: E = None
        self.s: E = None
        self.t: D = None
        self.v: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: D = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: A = None
        self.w: B = None
        self.x: G = None
        self.s: B = None
        self.z: F = None
        self.q: E = None
        self.v: B = None
        self.r: J = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: B = None
        self.o: G = None
        self.x: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: D = None
        self.w: I = None
        self.x: D = None
        self.q: D = None
        self.p: D = None
        self.r: G = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: J = None
        self.p: D = None
        self.o: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: E = None
        self.s: E = None
        self.t: D = None
        self.v: B = None
        self.txt = txt

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

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

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

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