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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: G = None
        self.z: C = None
        self.u: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: C = None
        self.s: E = None
        self.x: H = None
        self.v: H = None
        self.r: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: I = None
        self.u: D = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: B = None
        self.y: F = None
        self.p: H = None
        self.v: H = None
        self.x: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.q: A = None
        self.u: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: G = None
        self.z: C = None
        self.u: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: C = None
        self.s: E = None
        self.x: H = None
        self.v: H = None
        self.r: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: I = None
        self.u: D = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: B = None
        self.y: F = None
        self.p: H = None
        self.v: H = None
        self.x: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.q: A = None
        self.u: D = None
        self.txt = txt

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

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

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