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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: G = None
        self.q: F = None
        self.z: G = None
        self.x: F = None
        self.r: G = None
        self.y: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: F = None
        self.z: H = None
        self.y: E = None
        self.r: F = None
        self.p: A = None
        self.x: H = None
        self.u: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: B = None
        self.v: H = None
        self.u: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: G = None
        self.q: F = None
        self.z: G = None
        self.x: F = None
        self.r: G = None
        self.y: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: F = None
        self.z: H = None
        self.y: E = None
        self.r: F = None
        self.p: A = None
        self.x: H = None
        self.u: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: B = None
        self.v: H = None
        self.u: E = None
        self.txt = txt

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

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