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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: H = None
        self.p: A = None
        self.x: E = None
        self.q: H = None
        self.y: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: E = None
        self.t: B = None
        self.r: G = None
        self.q: F = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: H = None
        self.p: A = None
        self.x: E = None
        self.q: H = None
        self.y: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: E = None
        self.t: B = None
        self.r: G = None
        self.q: F = None
        self.z: F = None
        self.txt = txt

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

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