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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: A = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: G = None
        self.r: A = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: H = None
        self.q: E = None
        self.r: C = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: A = None
        self.s: H = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: D = None
        self.r: D = None
        self.t: F = None
        self.v: H = None
        self.w: A = None
        self.z: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: A = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: G = None
        self.r: A = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: H = None
        self.q: E = None
        self.r: C = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: A = None
        self.s: H = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: D = None
        self.r: D = None
        self.t: F = None
        self.v: H = None
        self.w: A = None
        self.z: F = None
        self.txt = txt

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

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