class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: A = None
        self.u: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: C = None
        self.p: J = None
        self.o: I = None
        self.w: J = None
        self.t: F = None
        self.s: J = None
        self.u: G = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: I = None
        self.z: D = None
        self.t: A = None
        self.v: B = None
        self.w: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: C = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: G = None
        self.x: E = None
        self.w: D = None
        self.s: E = None
        self.o: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: A = None
        self.u: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: C = None
        self.p: J = None
        self.o: I = None
        self.w: J = None
        self.t: F = None
        self.s: J = None
        self.u: G = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: I = None
        self.z: D = None
        self.t: A = None
        self.v: B = None
        self.w: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: C = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: G = None
        self.x: E = None
        self.w: D = None
        self.s: E = None
        self.o: D = None
        self.txt = txt

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

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

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

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