class A:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: D = None
        self.u: E = None
        self.s: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: I = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: A = None
        self.u: C = None
        self.r: B = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: F = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: I = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: A = None
        self.u: C = None
        self.r: B = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: F = None
        self.u: B = None
        self.txt = txt

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

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