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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: A = None
        self.z: H = None
        self.o: F = None
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: G = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: D = None
        self.v: C = None
        self.u: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: E = None
        self.w: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: A = None
        self.z: H = None
        self.o: F = None
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: G = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: D = None
        self.v: C = None
        self.u: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: E = None
        self.w: G = None
        self.txt = txt

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

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