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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: I = None
        self.w: A = None
        self.t: J = None
        self.o: B = None
        self.q: C = None
        self.v: G = None
        self.r: B = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: G = None
        self.x: G = None
        self.r: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: I = None
        self.w: A = None
        self.t: J = None
        self.o: B = None
        self.q: C = None
        self.v: G = None
        self.r: B = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: G = None
        self.x: G = None
        self.r: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

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

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