class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: F = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: G = None
        self.y: I = None
        self.q: F = None
        self.v: G = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: G = None
        self.y: I = None
        self.q: F = None
        self.v: G = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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

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

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

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