class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: G = None
        self.o: H = None
        self.q: G = None
        self.u: D = None
        self.p: E = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: C = None
        self.r: E = None
        self.y: C = None
        self.z: C = None
        self.q: D = None
        self.w: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: G = None
        self.s: H = None
        self.y: F = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: C = None
        self.r: E = None
        self.y: C = None
        self.z: C = None
        self.q: D = None
        self.w: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: G = None
        self.s: H = None
        self.y: F = None
        self.txt = txt

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

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

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

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

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

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