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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.w: C = None
        self.y: H = None
        self.x: I = None
        self.u: B = None
        self.s: H = None
        self.o: G = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: J = None
        self.z: H = None
        self.p: J = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.w: C = None
        self.y: H = None
        self.x: I = None
        self.u: B = None
        self.s: H = None
        self.o: G = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: J = None
        self.z: H = None
        self.p: J = None
        self.txt = txt

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

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

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

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

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

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

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