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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: C = None
        self.u: A = None
        self.y: D = None
        self.q: H = None
        self.x: H = None
        self.w: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: C = None
        self.u: A = None
        self.y: D = None
        self.q: H = None
        self.x: H = None
        self.w: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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

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