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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: J = None
        self.z: F = None
        self.y: I = None
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: J = None
        self.o: G = None
        self.y: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: B = None
        self.t: G = None
        self.x: J = None
        self.q: A = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: C = None
        self.t: C = None
        self.x: J = None
        self.p: B = None
        self.v: H = None
        self.q: D = None
        self.o: H = None
        self.w: H = None
        self.s: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: G = None
        self.o: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: J = None
        self.z: F = None
        self.y: I = None
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: J = None
        self.o: G = None
        self.y: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: B = None
        self.t: G = None
        self.x: J = None
        self.q: A = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: C = None
        self.t: C = None
        self.x: J = None
        self.p: B = None
        self.v: H = None
        self.q: D = None
        self.o: H = None
        self.w: H = None
        self.s: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: G = None
        self.o: B = None
        self.txt = txt

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

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