class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: B = None
        self.v: D = None
        self.s: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: F = None
        self.s: D = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: C = None
        self.y: E = None
        self.q: A = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: G = None
        self.w: E = None
        self.r: D = None
        self.z: F = None
        self.t: F = None
        self.u: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: F = None
        self.s: D = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: C = None
        self.y: E = None
        self.q: A = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: G = None
        self.w: E = None
        self.r: D = None
        self.z: F = None
        self.t: F = None
        self.u: A = None
        self.txt = txt

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

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