class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: G = None
        self.y: D = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: A = None
        self.p: G = None
        self.o: E = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: B = None
        self.z: D = None
        self.r: F = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: E = None
        self.p: G = None
        self.q: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: G = None
        self.r: B = None
        self.txt = txt

c = A("c")
k = B("k")
i = C("i")
h = D("h")
g = E("g")
b = F("b")
j = G("j")
a = H("a")

c.z = a
c.o = j
c.r = j
c.y = h
k.v = j
k.p = j
k.t = c
k.o = g
k.w = b
i.u = j
i.o = k
i.z = h
i.r = b
i.x = b
h.t = a
h.u = g
h.p = j
h.q = i
g.z = a
g.p = a
g.q = j
g.s = b
g.v = i
g.w = c
b.t = k
b.u = j
b.s = i
b.v = i
b.z = g
j.u = a
j.r = k
j.p = i
j.w = g
j.z = c
j.t = c
a.q = k
a.r = k
a.v = j
assert j.p.x.z.q.r.t.r.r.txt == "
class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: G = None
        self.y: D = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: A = None
        self.p: G = None
        self.o: E = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: B = None
        self.z: D = None
        self.r: F = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: E = None
        self.p: G = None
        self.q: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: G = None
        self.r: B = None
        self.txt = txt

c = A("c")
k = B("k")
i = C("i")
h = D("h")
g = E("g")
b = F("b")
j = G("j")
a = H("a")

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