class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: E = None
        self.w: C = None
        self.o: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: D = None
        self.s: C = None
        self.w: G = None
        self.v: G = None
        self.r: B = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: E = None
        self.p: E = None
        self.u: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: E = None
        self.w: C = None
        self.o: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: D = None
        self.s: C = None
        self.w: G = None
        self.v: G = None
        self.r: B = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: E = None
        self.p: E = None
        self.u: F = None
        self.txt = txt

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

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