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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: F = None
        self.r: I = None
        self.v: B = None
        self.w: B = None
        self.t: F = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: I = None
        self.p: A = None
        self.q: F = None
        self.r: A = None
        self.x: A = None
        self.y: E = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: F = None
        self.r: I = None
        self.v: B = None
        self.w: B = None
        self.t: F = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: I = None
        self.p: A = None
        self.q: F = None
        self.r: A = None
        self.x: A = None
        self.y: E = None
        self.s: F = None
        self.txt = txt

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

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

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