class A:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: C = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: F = None
        self.w: G = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: G = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: D = None
        self.v: C = None
        self.y: C = None
        self.s: F = None
        self.w: C = None
        self.q: A = None
        self.t: B = None
        self.r: F = None
        self.o: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.o: I = None
        self.s: H = None
        self.u: C = None
        self.y: A = None
        self.r: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: F = None
        self.w: G = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: G = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: D = None
        self.v: C = None
        self.y: C = None
        self.s: F = None
        self.w: C = None
        self.q: A = None
        self.t: B = None
        self.r: F = None
        self.o: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.o: I = None
        self.s: H = None
        self.u: C = None
        self.y: A = None
        self.r: C = None
        self.txt = txt

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

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