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

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

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: I = None
        self.o: A = None
        self.r: J = None
        self.z: A = None
        self.u: A = None
        self.v: G = None
        self.w: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: F = None
        self.o: F = None
        self.u: B = None
        self.v: B = None
        self.s: F = None
        self.x: G = None
        self.t: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: I = None
        self.o: A = None
        self.r: J = None
        self.z: A = None
        self.u: A = None
        self.v: G = None
        self.w: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: F = None
        self.o: F = None
        self.u: B = None
        self.v: B = None
        self.s: F = None
        self.x: G = None
        self.t: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: B = None
        self.txt = txt

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

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