class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: E = None
        self.s: E = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: G = None
        self.s: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: H = None
        self.w: G = None
        self.y: B = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: B = None
        self.v: C = None
        self.x: G = None
        self.z: A = None
        self.t: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: G = None
        self.q: F = None
        self.v: I = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: G = None
        self.p: B = None
        self.t: A = None
        self.z: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.q: D = None
        self.x: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: I = None
        self.v: G = None
        self.w: B = None
        self.u: E = None
        self.txt = txt

n = A("n")
f = B("f")
m = C("m")
i = D("i")
g = E("g")
b = F("b")
c = G("c")
j = H("j")
a = I("a")
l = J("l")

n.y = f
n.t = g
n.s = g
n.q = c
f.p = i
f.q = c
f.s = l
m.v = f
m.y = f
m.r = j
m.w = c
m.p = c
i.p = f
i.q = f
i.v = m
i.x = c
i.z = n
i.t = a
g.s = c
g.p = c
g.q = b
g.v = a
g.t = j
b.q = l
b.o = c
b.p = f
b.t = n
b.z = n
c.t = l
c.v = n
j.y = c
j.p = b
j.w = g
a.p = l
a.q = i
a.x = i
l.q = c
l.v = c
l.o = a
l.w = f
l.u = g
assert g.v.x.p.s.u.t.y.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: E = None
        self.s: E = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: G = None
        self.s: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: H = None
        self.w: G = None
        self.y: B = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: B = None
        self.v: C = None
        self.x: G = None
        self.z: A = None
        self.t: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: G = None
        self.q: F = None
        self.v: I = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: G = None
        self.p: B = None
        self.t: A = None
        self.z: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.q: D = None
        self.x: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: I = None
        self.v: G = None
        self.w: B = None
        self.u: E = None
        self.txt = txt

n = A("n")
f = B("f")
m = C("m")
i = D("i")
g = E("g")
b = F("b")
c = G("c")
j = H("j")
a = I("a")
l = J("l")

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