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

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

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: F = None
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: C = None
        self.p: D = None
        self.w: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: F = None
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: C = None
        self.p: D = None
        self.w: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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