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

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: E = None
        self.z: G = None
        self.s: C = None
        self.t: G = None
        self.p: C = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: G = None
        self.o: A = None
        self.v: H = None
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: C = None
        self.y: F = None
        self.r: D = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: E = None
        self.z: G = None
        self.s: C = None
        self.t: G = None
        self.p: C = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: G = None
        self.o: A = None
        self.v: H = None
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: C = None
        self.y: F = None
        self.r: D = None
        self.x: D = None
        self.txt = txt

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

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

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

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