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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: D = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: F = None
        self.y: G = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: D = None
        self.v: A = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: F = None
        self.w: D = None
        self.z: D = None
        self.r: C = None
        self.txt = txt

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

j = A("j")
e = B("e")
f = C("f")
n = D("n")
l = E("l")
b = F("b")
g = G("g")
h = H("h")
m = H("m")

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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: D = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: F = None
        self.y: G = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: D = None
        self.v: A = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: F = None
        self.w: D = None
        self.z: D = None
        self.r: C = None
        self.txt = txt

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

j = A("j")
e = B("e")
f = C("f")
n = D("n")
l = E("l")
b = F("b")
g = G("g")
h = H("h")
m = H("m")

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