class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: E = None
        self.q: I = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: H = None
        self.o: C = None
        self.q: D = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: A = None
        self.u: F = None
        self.r: C = None
        self.s: B = None
        self.z: C = None
        self.w: H = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: H = None
        self.o: C = None
        self.q: D = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: A = None
        self.u: F = None
        self.r: C = None
        self.s: B = None
        self.z: C = None
        self.w: H = None
        self.v: H = None
        self.txt = txt

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

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

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

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