class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: H = None
        self.q: F = None
        self.y: E = None
        self.u: E = None
        self.r: H = None
        self.x: G = None
        self.w: E = None
        self.s: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: F = None
        self.s: H = None
        self.t: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: A = None
        self.z: C = None
        self.r: B = None
        self.v: B = None
        self.t: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: F = None
        self.q: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: F = None
        self.s: H = None
        self.t: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: A = None
        self.z: C = None
        self.r: B = None
        self.v: B = None
        self.t: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: F = None
        self.q: A = None
        self.txt = txt

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

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

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