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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: B = None
        self.o: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: F = None
        self.z: D = None
        self.v: A = None
        self.txt = txt

j = A("j")
m = B("m")
g = C("g")
a = D("a")
i = E("i")
n = F("n")
d = G("d")
c = H("c")
b = I("b")

j.y = a
j.x = d
j.p = i
j.r = g
m.w = g
g.t = a
g.q = b
a.s = m
a.x = m
a.z = b
a.o = d
a.y = d
a.q = g
a.r = g
a.v = n
a.w = i
i.x = d
i.r = m
i.o = a
n.z = i
n.o = b
d.v = c
d.z = c
c.u = a
c.s = m
c.p = m
c.q = i
c.x = i
c.z = b
c.y = b
c.o = j
c.v = g
b.r = g
b.q = n
b.z = a
b.v = j
assert j.x.v.y.z.q.q.r.q.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: G = None
        self.p: E = None
        self.r: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: B = None
        self.o: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: F = None
        self.z: D = None
        self.v: A = None
        self.txt = txt

j = A("j")
m = B("m")
g = C("g")
a = D("a")
i = E("i")
n = F("n")
d = G("d")
c = H("c")
b = I("b")

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