class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: D = None
        self.o: F = None
        self.q: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: B = None
        self.r: D = None
        self.q: A = None
        self.z: B = None
        self.x: B = None
        self.w: A = None
        self.txt = txt

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

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

n = A("n")
e = B("e")
k = C("k")
i = D("i")
j = E("j")
m = F("m")
g = G("g")
b = H("b")

n.z = j
n.u = j
e.t = b
e.y = k
e.r = i
e.s = i
e.z = n
e.w = n
k.u = m
k.o = m
k.t = i
k.q = g
i.q = j
i.o = g
i.u = b
j.o = b
j.r = b
j.s = b
j.u = e
j.p = e
j.t = e
j.q = k
j.z = i
m.v = g
m.t = e
m.z = e
m.x = e
m.r = i
m.q = n
m.w = n
g.y = m
g.t = m
g.s = m
g.o = n
g.q = e
g.u = e
g.z = i
b.t = m
b.o = i
b.v = j
assert m.t.y.q.q.y.q.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: D = None
        self.o: F = None
        self.q: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: B = None
        self.r: D = None
        self.q: A = None
        self.z: B = None
        self.x: B = None
        self.w: A = None
        self.txt = txt

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

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

n = A("n")
e = B("e")
k = C("k")
i = D("i")
j = E("j")
m = F("m")
g = G("g")
b = H("b")

n.z = j
n.u = j
e.t = b
e.y = k
e.r = i
e.s = i
e.z = n
e.w = n
k.u = m
k.o = m
k.t = i
k.q = g
i.q = j
i.o = g
i.u = b
j.o = b
j.r = b
j.s = b
j.u = e
j.p = e
j.t = e
j.q = k
j.z = i
m.v = g
m.t = e
m.z = e
m.x = e
m.r = i
m.q = n
m.w = n
g.y = m
g.t = m
g.s = m
g.o = n
g.q = e
g.u = e
g.z = i
b.t = m
b.o = i
b.v = j
assert m.t.y.q.q.y.q.txt == "g"