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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: G = None
        self.q: C = None
        self.w: E = None
        self.o: E = None
        self.u: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: G = None
        self.q: C = None
        self.w: E = None
        self.o: E = None
        self.u: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

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