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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: G = None
        self.r: A = None
        self.p: C = None
        self.o: C = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: A = None
        self.o: G = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: F = None
        self.x: H = None
        self.p: B = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: B = None
        self.u: D = None
        self.r: C = None
        self.y: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: C = None
        self.z: D = None
        self.s: F = None
        self.u: B = None
        self.w: C = None
        self.q: D = None
        self.r: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: G = None
        self.r: A = None
        self.p: C = None
        self.o: C = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: A = None
        self.o: G = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: F = None
        self.x: H = None
        self.p: B = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: B = None
        self.u: D = None
        self.r: C = None
        self.y: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: C = None
        self.z: D = None
        self.s: F = None
        self.u: B = None
        self.w: C = None
        self.q: D = None
        self.r: C = None
        self.txt = txt

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

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

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