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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: E = None
        self.y: D = None
        self.z: F = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: C = None
        self.txt = txt

h = A("h")
f = B("f")
k = C("k")
l = D("l")
a = E("a")
g = F("g")
d = G("d")
n = H("n")
j = D("j")

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: E = None
        self.y: D = None
        self.z: F = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: C = None
        self.txt = txt

h = A("h")
f = B("f")
k = C("k")
l = D("l")
a = E("a")
g = F("g")
d = G("d")
n = H("n")
j = D("j")

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