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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: D = None
        self.u: J = None
        self.x: G = None
        self.w: A = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: G = None
        self.t: I = None
        self.r: G = None
        self.z: I = None
        self.x: E = None
        self.o: I = None
        self.w: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: B = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: D = None
        self.u: J = None
        self.x: G = None
        self.w: A = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: G = None
        self.t: I = None
        self.r: G = None
        self.z: I = None
        self.x: E = None
        self.o: I = None
        self.w: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: B = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: B = None
        self.txt = txt

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

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

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