class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: H = None
        self.r: B = None
        self.w: H = None
        self.t: B = None
        self.z: D = None
        self.u: J = None
        self.s: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: I = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: J = None
        self.s: B = None
        self.q: J = None
        self.o: H = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: A = None
        self.w: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: C = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: I = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: J = None
        self.s: B = None
        self.q: J = None
        self.o: H = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: A = None
        self.w: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: C = None
        self.v: H = None
        self.txt = txt

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

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

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