class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: B = None
        self.w: H = None
        self.q: H = None
        self.y: G = None
        self.u: E = None
        self.t: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: D = None
        self.u: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: A = None
        self.q: G = None
        self.w: C = None
        self.x: C = None
        self.v: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: D = None
        self.u: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: A = None
        self.q: G = None
        self.w: C = None
        self.x: C = None
        self.v: F = None
        self.txt = txt

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

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