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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.y: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: C = None
        self.v: B = None
        self.p: D = None
        self.w: C = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.y: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: C = None
        self.v: B = None
        self.p: D = None
        self.w: C = None
        self.z: E = None
        self.txt = txt

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

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

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

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