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

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

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: G = None
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: J = None
        self.p: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.u: A = None
        self.q: C = None
        self.p: E = None
        self.x: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: G = None
        self.q: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: G = None
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: J = None
        self.p: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.u: A = None
        self.q: C = None
        self.p: E = None
        self.x: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: G = None
        self.q: C = None
        self.txt = txt

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

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