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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: F = None
        self.p: D = None
        self.w: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: B = None
        self.y: D = None
        self.w: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: F = None
        self.p: D = None
        self.w: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: B = None
        self.y: D = None
        self.w: B = None
        self.txt = txt

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

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